< draft-boutell-png-spec-03.txt   draft-boutell-png-spec-04.txt >
INTERNET-DRAFT T. Boutell, et al INTERNET-DRAFT T. Boutell, et al
Portable Network Graphics Boutell.Com, Inc. Portable Network Graphics Boutell.Com, Inc.
Expires: 28 Nov 1996 28 May 1996 Expires: 10 Dec 1996 10 June 1996
PNG (Portable Network Graphics) Specification PNG (Portable Network Graphics) Specification
Version 1.0 Version 1.0
File draft-boutell-png-spec-03.txt File draft-boutell-png-spec-04.txt
Status of This Memo Status of This Memo
This document is an Internet-Draft. Internet-Drafts are working This document is an Internet-Draft. Internet-Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas, documents of the Internet Engineering Task Force (IETF), its areas,
and its working groups. Note that other groups may also distribute and its working groups. Note that other groups may also distribute
working documents as Internet-Drafts. working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
skipping to change at page 2, line 42 skipping to change at page 2, line 42
4.2.4. hIST Image Histogram ............................... 19 4.2.4. hIST Image Histogram ............................... 19
4.2.5. pHYs Physical Pixel Dimensions ..................... 20 4.2.5. pHYs Physical Pixel Dimensions ..................... 20
4.2.6. sBIT Significant Bits .............................. 21 4.2.6. sBIT Significant Bits .............................. 21
4.2.7. tEXt Textual Data .................................. 22 4.2.7. tEXt Textual Data .................................. 22
4.2.8. tIME Image Last-Modification Time .................. 23 4.2.8. tIME Image Last-Modification Time .................. 23
4.2.9. tRNS Transparency .................................. 24 4.2.9. tRNS Transparency .................................. 24
4.2.10. zTXt Compressed Textual Data ...................... 25 4.2.10. zTXt Compressed Textual Data ...................... 25
4.3. Summary of Standard Chunks ............................... 26 4.3. Summary of Standard Chunks ............................... 26
4.4. Additional Chunk Types ................................... 26 4.4. Additional Chunk Types ................................... 26
5. Deflate/Inflate Compression ................................... 27 5. Deflate/Inflate Compression ................................... 27
6. Filter Algorithms ............................................. 28 6. Filter Algorithms ............................................. 29
6.1. Filter type 0: None ...................................... 30 6.1. Filter type 0: None ...................................... 30
6.2. Filter type 1: Sub ....................................... 30 6.2. Filter type 1: Sub ....................................... 30
6.3. Filter type 2: Up ........................................ 30 6.3. Filter type 2: Up ........................................ 31
6.4. Filter type 3: Average ................................... 31 6.4. Filter type 3: Average ................................... 31
6.5. Filter type 4: Paeth ..................................... 32 6.5. Filter type 4: Paeth ..................................... 32
7. Chunk Ordering Rules .......................................... 33 7. Chunk Ordering Rules .......................................... 33
7.1. Behavior of PNG editors .................................. 34 7.1. Behavior of PNG editors .................................. 34
7.2. Ordering of ancillary chunks ............................. 34 7.2. Ordering of ancillary chunks ............................. 34
7.3. Ordering of critical chunks .............................. 35 7.3. Ordering of critical chunks .............................. 35
8. Miscellaneous Topics .......................................... 35 8. Miscellaneous Topics .......................................... 35
8.1. File name extension ...................................... 35 8.1. File name extension ...................................... 35
8.2. Internet media type ...................................... 35 8.2. Internet media type ...................................... 35
8.3. Macintosh file layout .................................... 35 8.3. Macintosh file layout .................................... 35
skipping to change at page 27, line 46 skipping to change at page 27, line 46
Additional flags/check bits: 1 byte Additional flags/check bits: 1 byte
Compressed data blocks: n bytes Compressed data blocks: n bytes
Check value: 4 bytes Check value: 4 bytes
Further details on this format are given in the zlib specification Further details on this format are given in the zlib specification
[RFC-1950]. [RFC-1950].
For PNG compression method 0, the zlib compression method/flags code For PNG compression method 0, the zlib compression method/flags code
must specify method code 8 ("deflate" compression) and an LZ77 window must specify method code 8 ("deflate" compression) and an LZ77 window
size of not more than 32K. Note that the zlib compression method size of not more than 32K. Note that the zlib compression method
number is unrelated to the PNG compression method number. number is not the same as the PNG compression method number. The
additional flags must not specify a preset dictionary.
The compressed data within the zlib datastream is stored as a series The compressed data within the zlib datastream is stored as a series
of blocks, each of which can represent raw (uncompressed) data, of blocks, each of which can represent raw (uncompressed) data,
LZ77-compressed data encoded with fixed Huffman codes, or LZ77- LZ77-compressed data encoded with fixed Huffman codes, or LZ77-
compressed data encoded with custom Huffman codes. A marker bit in compressed data encoded with custom Huffman codes. A marker bit in
the final block identifies it as the last block, allowing the decoder the final block identifies it as the last block, allowing the decoder
to recognize the end of the compressed datastream. Further details to recognize the end of the compressed datastream. Further details
on the compression algorithm and the encoding are given in the on the compression algorithm and the encoding are given in the
deflate specification [RFC-1951]. deflate specification [RFC-1951].
skipping to change at page 40, line 31 skipping to change at page 40, line 31
correct gAMA value is determined by the gamma characteristic of correct gAMA value is determined by the gamma characteristic of
the hardware. In the case of video digitizers ("frame grabbers"), the hardware. In the case of video digitizers ("frame grabbers"),
gAMA should be 0.45 or 0.5 for NTSC (possibly less for PAL or gAMA should be 0.45 or 0.5 for NTSC (possibly less for PAL or
SECAM) since video camera transfer functions are standardized. SECAM) since video camera transfer functions are standardized.
Image scanners are less predictable. Their output samples may be Image scanners are less predictable. Their output samples may be
linear (gamma 1.0) since CCD sensors themselves are linear, or the linear (gamma 1.0) since CCD sensors themselves are linear, or the
scanner hardware may have already applied gamma correction scanner hardware may have already applied gamma correction
designed to compensate for dot gain in subsequent printing (gamma designed to compensate for dot gain in subsequent printing (gamma
of about 0.57), or the scanner may have corrected the samples for of about 0.57), or the scanner may have corrected the samples for
display on a CRT (gamma of 0.4-0.5). You will need to refer to display on a CRT (gamma of 0.4-0.5). You will need to refer to
the scanner's manual, or even scan a calibrated grey wedge, to the scanner's manual, or even scan a calibrated gray wedge, to
determine what a particular scanner does. determine what a particular scanner does.
File format converters generally should not attempt to convert File format converters generally should not attempt to convert
supplied images to a different gamma. Store the data in the PNG supplied images to a different gamma. Store the data in the PNG
file without conversion, and record the source gamma if it is file without conversion, and record the source gamma if it is
known. Gamma alteration at file conversion time causes known. Gamma alteration at file conversion time causes
requantization of the set of intensity levels that are requantization of the set of intensity levels that are
represented, introducing further roundoff error with little represented, introducing further roundoff error with little
benefit. It's almost always better to just copy the sample values benefit. It's almost always better to just copy the sample values
intact from the input to the output file. intact from the input to the output file.
skipping to change at page 90, line 24 skipping to change at page 90, line 24
* Jeremy Wohl, jeremy@cs.sunysb.edu * Jeremy Wohl, jeremy@cs.sunysb.edu
The authors wish to acknowledge the contributions of the Portable The authors wish to acknowledge the contributions of the Portable
Network Graphics mailing list and the readers of comp.graphics. Network Graphics mailing list and the readers of comp.graphics.
Trademarks Trademarks
GIF is a service mark of CompuServe Incorporated. IBM PC is a GIF is a service mark of CompuServe Incorporated. IBM PC is a
trademark of International Business Machines Corporation. trademark of International Business Machines Corporation.
Macintosh is a trademark of Apple Computer, Inc. Microsoft and Macintosh is a trademark of Apple Computer, Inc. Microsoft and
MS-DOS are trademarks of Microsoft Corporation. PostScript and MS-DOS are trademarks of Microsoft Corporation. PhotoCD is a
TIFF are trademarks of Adobe Systems Incorporated. SGI is a trademark of Eastman Kodak Company. PostScript and TIFF are
trademark of Silicon Graphics, Inc. X Window System is a trademarks of Adobe Systems Incorporated. SGI is a trademark of
trademark of the Massachusetts Institute of Technology. Silicon Graphics, Inc. X Window System is a trademark of the
Massachusetts Institute of Technology.
IESG Note: IESG Note
A disclaimer by the Internet Engineering Steering Group A disclaimer by the Internet Engineering Steering Group regarding
regarding intellectual property claims will be inserted here. intellectual property claims will be inserted here.
COPYRIGHT NOTICE COPYRIGHT NOTICE
Copyright (c) 1996 by: Massachusetts Institute of Technology (MIT) Copyright (c) 1996 by: Massachusetts Institute of Technology (MIT)
This W3C specification is being provided by the copyright holders This W3C specification is being provided by the copyright holders
under the following license. By obtaining, using and/or copying under the following license. By obtaining, using and/or copying
this specification, you agree that you have read, understood, and this specification, you agree that you have read, understood, and
will comply with the following terms and conditions: will comply with the following terms and conditions:
 End of changes. 9 change blocks. 
13 lines changed or deleted 15 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/