PNG: The Definitive Guide

Book description

PNG (Portable Network Graphics) is the next-generation graphics file format for the Web. Designed as an open-source format to replace the proprietary GIF format, PNG is better, smaller, more extensible, and free. Already supported by major software like Macromedia Fireworks, Adobe Photoshop, and Microsoft Office, as well as Netscape Navigator and Microsoft Internet Explorer, PNG is an elegant and feature-rich image format that has finally achieved broad industry support.PNG: The Definitive Guide addresses the needs of both graphic designers who want to get the most out of the format and programmers who want to add full PNG support to their own applications.In the "Using PNG" section, Roelofs covers Web browsers and servers, image viewers, image editors, image converters, and 3D applications, with particular attention to the level of PNG support in each. In the "Design of PNG" section, he includes detailed information on compression and filtering, gamma correction and precision color, PNG options and extensions. In the "Programming PNG" section, he steps through three sample programs that implement PNG with the libpng C library.PNG: The Definitive Guide is the first book devoted exclusively to teaching and documenting this important new image format. It is an indispensable compendium for Web content developers and programmers and is chock full of examples, sample code, and practical hands-on advice.

Table of contents

  1. Cover Page
  2. Title Page
  3. Copyright
  4. Dedication
  5. Preface
    1. About This Book
    2. Conventions Used in This Book
    3. How to Contact Us
    4. About the “Second Edition” (HTML Version)
    5. History
    6. Acknowledgments
  6. Contents
  7. List of Figures
  8. List of Tables
  9. Part I: Using PNG
    1. Chapter 1. An Introduction to PNG
      1. 1.1. Overview of Image Properties
      2. 1.2. What Is PNG Good For?
      3. 1.3. Case Study of a PNG-Supporting Image Editor
    2. Chapter 2. Applications: WWW Browsers and Servers
      1. 2.1. WWW Browsers
      2. 2.2. WWW Servers
    3. Chapter 3. Applications: Image Viewers
      1. 3.1. Windows 95/98/NT
      2. 3.2. Windows 3.x
      3. 3.3. VMS
      4. 3.4. Unix
      5. 3.5. OS/2
      6. 3.6. Macintosh
      7. 3.7. Java
      8. 3.8. DOS
      9. 3.9. BeOS
      10. 3.10. Atari
      11. 3.11. Amiga
      12. 3.12. Acorn RISC OS
    4. Chapter 4. Applications: Image Editors
      1. 4.1. Photoshop 5
      2. 4.2. Photoshop 4
      3. 4.3. ImageReady
      4. 4.4. Paint Shop Pro
      5. 4.5. The GIMP
      6. 4.6. Other Image Editors
    5. Chapter 5. Applications: Image Converters
      1. 5.1. pngcrush
      2. 5.2. pnmtopng
      3. 5.3. gif2png
      4. 5.4. Tiff2png
      5. 5.5. pngcheck
      6. 5.6. Other Conversion Programs
    6. Chapter 6. Applications: VRML Browsers and Other 3D Apps
      1. 6.1. Cosmo Player
      2. 6.2. WorldView/MSVRML
      3. 6.3. blaxxun Contact
      4. 6.4. Viscape Universal
      5. 6.5. LibVRML97/Lookat
      6. 6.6. FreeWRL
      7. 6.7. VRMLView
      8. 6.8. Other VRML Browsers
      9. 6.9. Other 3D Applications
  10. Part II: The Design of PNG
    1. Chapter 7. History of the Portable Network Graphics Format
      1. 7.1. Anatomy of an Internet Working Group
      2. 7.2. Implementation
      3. 7.3. MNG
      4. 7.4. Mainstream Support and Present Status
    2. Chapter 8. PNG Basics
      1. 8.1. Chunks
      2. 8.2. PNG Signature
      3. 8.3. A Word on Color Representation
      4. 8.4. The Simplest PNG
      5. 8.5. PNG Image Types
      6. 8.5.1. Palette-Based
      7. 8.5.2. Palette-Based with Transparency
      8. 8.5.3. Grayscale
      9. 8.5.4. Grayscale with Transparency
      10. 8.5.5. Grayscale with Alpha Channel
      11. 8.5.6. RGB
      12. 8.5.7. RGB with Transparency
      13. 8.5.8. RGB with Alpha Channel
      14. 8.6. Interlacing and Progressive Display
    3. Chapter 9. Compression and Filtering
      1. 9.1. Filtering
      2. 9.2. The Deflate Compression Algorithm
      3. 9.2.1. A Final Word on Patents
      4. 9.3. Real-World Comparisons
      5. 9.4. Practical Compression Tips
      6. 9.4.1. Tips for Users
      7. 9.4.2. Tips for Programmers
    4. Chapter 10. Gamma Correction and Precision Color
      1. 10.1. Transfer Functions and Gamma
      2. 10.2. The gAMA Chunk
      3. 10.3. Encoding Gamma
      4. 10.4. Gamma Gotchas
      5. 10.5. Chromaticity
      6. 10.6. Color Management Systems and sRGB
      7. 10.7. ICC Profiles
    5. Chapter 11. PNG Options and Extensions
      1. Background Color (bKGD)
      2. Timestamp (tIME)
      3. Latin-1 Text Annotations (tEXt, zTXt)
      4. International Text Annotations (iTXt)
      5. Histogram (hIST)
      6. Suggested Palette (sPLT)
      7. Significant Bits (sBIT)
      8. Physical Pixel Dimensions (pHYs)
      9. Physical Scale (sCAL)
      10. Image Offset (oFFs)
      11. Pixel Calibration (pCAL)
      12. Fractal Parameters fRAc)
      13. GIF Conversion Info (gIFg, gIFx)
      14. GIF Plain Text (gIFt)
      15. Other Chunks
    6. Chapter 12. Multiple-image Network Graphics
      1. 12.1. Common Applications of MNG
      2. 12.2. MNG Structure
      3. 12.3. The Simplest MNG
      4. 12.4. An Animated MNG
      5. 12.5. An Algorithmic MNG
      6. 12.6. A JPEG Image with Transparency
      7. 12.7. MNG Applications
      8. 12.8. The Future?
  11. Part III: Programming with PNG
    1. Chapter 13. Reading PNG Images
      1. 13.1. A libpng-Based, PNG-Reading Demo Program
      2. 13.2. Preliminaries
      3. 13.3. readpng_init()
      4. 13.4. readpng_get_bgcolor()
      5. 13.5. Design Decisions
      6. 13.6. Gamma and Color Correction
      7. 13.7. readpng_get_image()
      8. 13.8. readpng_cleanup()
      9. 13.9. Compositing and Displaying the Image
      10. 13.10. Getting the Source Code
      11. 13.11. Alternative Approaches
    2. Chapter 14. Reading PNG Images Progressively
      1. 14.1. Preliminaries
      2. 14.2. readpng2_init()
      3. 14.3. readpng2_decode_data()
      4. 14.4. readpng2_info_callback()
      5. 14.5. readpng2_row_callback()
      6. 14.6. Compositing and Displaying the Image
      7. 14.7. readpng2_end_callback()
      8. 14.8. readpng2_cleanup()
      9. 14.9. Getting the Source Code
    3. Chapter 15. Writing PNG Images
      1. 15.1. A libpng-Based, PNG-Writing Demo Program
      2. 15.2. Gamma Correction
      3. 15.3. Text Chunks
      4. 15.4. writepng_version_info()
      5. 15.5. writepng_init()
      6. 15.6. Interlaced PNG: writepng_encode_image()
      7. 15.7. Noninterlaced PNG: writepng_encode_row()
      8. 15.8. writepng_cleanup()
      9. 15.9. Getting the Source Code
    4. Chapter 16. Other Libraries and Concluding Remarks
      1. 16.1. Cross-Platform Libraries
      2. 16.2. Windows-Specific Libraries
      3. 16.3. Concluding Remarks
  12. References
    1. Chapter 1
    2. Chapter 2
    3. Chapter 5
    4. Chapter 6
    5. Chapter 7
    6. Chapter 8
    7. Chapter 9
    8. Chapter 10
    9. Chapter 11
    10. Chapter 12
    11. Chapter 13
    12. Chapter 15
    13. Chapter 16
  13. Glossary
  14. Index
  15. About the Author
  16. Colophon

Product information

  • Title: PNG: The Definitive Guide
  • Author(s): Greg Roelofs
  • Release date: June 1999
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781565925427