RFC 2083 (rfc2083) - Page 2 of 102


PNG (Portable Network Graphics) Specification Version 1



Alternative Format: Original Text Document



RFC 2083            PNG: Portable Network Graphics            March 1997


      2.8. Text strings ............................................. 10
   3. File Structure ................................................ 11
      3.1. PNG file signature ....................................... 11
      3.2. Chunk layout ............................................. 11
      3.3. Chunk naming conventions ................................. 12
      3.4. CRC algorithm ............................................ 15
   4. Chunk Specifications .......................................... 15
      4.1. Critical chunks .......................................... 15
          4.1.1. IHDR Image header .................................. 15
          4.1.2. PLTE Palette ....................................... 17
          4.1.3. IDAT Image data .................................... 18
          4.1.4. IEND Image trailer ................................. 19
      4.2. Ancillary chunks ......................................... 19
          4.2.1. bKGD Background color .............................. 19
          4.2.2. cHRM Primary chromaticities and white point ........ 20
          4.2.3. gAMA Image gamma ................................... 21
          4.2.4. hIST Image histogram ............................... 21
          4.2.5. pHYs Physical pixel dimensions ..................... 22
          4.2.6. sBIT Significant bits .............................. 22
          4.2.7. tEXt Textual data .................................. 24
          4.2.8. tIME Image last-modification time .................. 25
          4.2.9. tRNS Transparency .................................. 26
          4.2.10. zTXt Compressed textual data ...................... 27
      4.3. Summary of standard chunks ............................... 28
      4.4. Additional chunk types ................................... 29
   5. Deflate/Inflate Compression ................................... 29
   6. Filter Algorithms ............................................. 31
      6.1. Filter types ............................................. 31
      6.2. Filter type 0: None ...................................... 32
      6.3. Filter type 1: Sub ....................................... 33
      6.4. Filter type 2: Up ........................................ 33
      6.5. Filter type 3: Average ................................... 34
      6.6. Filter type 4: Paeth...................................... 35
   7. Chunk Ordering Rules .......................................... 36
      7.1. Behavior of PNG editors .................................. 37
      7.2. Ordering of ancillary chunks ............................. 38
      7.3. Ordering of critical chunks .............................. 38
   8. Miscellaneous Topics .......................................... 39
      8.1. File name extension ...................................... 39
      8.2. Internet media type ...................................... 39
      8.3. Macintosh file layout .................................... 39
      8.4. Multiple-image extension ................................. 39
      8.5. Security considerations .................................. 40
   9. Recommendations for Encoders .................................. 41
      9.1. Sample depth scaling ..................................... 41
      9.2. Encoder gamma handling ................................... 42
      9.3. Encoder color handling ................................... 45
      9.4. Alpha channel creation ................................... 47



Boutell, et. al.             Informational