Comments on this document can be sent to the PNG specification maintainers at
png-info@uunet.uu.netor at
png-list@dworkin.wustl.edu.
Distribution of this memo is unlimited.
At present, the latest version of this document is available on the World Wide Web from
ftp://swrinde.nde.swri.edu/pub/png-group/documents/.
Permission is granted to copy and distribute this document for any purpose and without charge, provided that the copyright notice and this notice are preserved, and that any substantive changes or deletions from the original are clearly marked.
png-info@uunet.uu.net.The basic PNG specification is available from the W3C archive at
http://www.w3.org/pub/WWW/TR/WD-png.
Whenever you use any of these unregistered chunks you should also include a "tEXt" chunk describing it, for example:
tEXtComment\0 This file contains a ycAL chunk written according to the format given in Version 19970203 of the PNG Proposed Chunks document.For those proposed chunks that have a "signature" field, decoders should check to ensure that the signature field is present and that its contents exactly match the specified string.
Proposed Multiple Ordering chunk name OK? constraints xCAL No Before IDAT yCAL No Before IDAT
The "xxSC" chunk's contents are
n bytes:  purpose (Latin-1 text)
1 byte:   null separator
20 bytes: signature ("PNG group 1996-10-11")
1 byte:   null separator
xu bytes: Xunit (Latin-1 text).  Symbol or description of
          the width unit, eg. milliseconds, degrees West
          Longitude,  etc).  A zero-length string can be
          used if the data is dimensionless.
1 byte:   null separator
x0 bytes: Xoffset (ASCII text).  X offset, a real number
          written as a text floating-point value [link
          to Floating-Point Values in PNG extensions
          document] This is the physical value of "x"
          corresponding to the left edge of the image.
1 byte:   null separator
xs bytes: X-calibration (ASCII text). The distance
          corresponding to the width of a pixel.  Must
          be non-zero.  The positive direction is to
          the right.
There is no null separator for the final string.
The "purpose" identifies the x-calibration, which can permit applications or people to choose the appropriate one when more than one x-calibraton is stored in a multiple-image file. The "purpose" string must follow the format of a "tEXt" keyword, i.e. 1-79 printable Latin-1 characters.
The algorithm for finding the physical x-value of the middle of a pixel is
physical_x_value := Xoffset + Xcalibration * (column_number + 0.5)If present, the "xxSC" chunk must appear before the first "IDAT" chunk. Only one instance of the "xxSC" chunk is permitted in a PNG stream.
The "yySC" chunk's contents are
n bytes:  purpose (Latin-1 text)
1 byte:   null separator
20 bytes: signature ("PNG group 1996-10-11")
1 byte:   null separator
yu bytes: Yunit (Latin-1 text).  Symbol or description of
          the width unit, eg. milliseconds, degrees West
          Longitude,  etc).  A zero-length string can be
          used if the data is dimensionless.
1 byte:   null separator
y0 bytes: Yoffset (ASCII text).  Y offset, a real number
          written as a text floating-point value [link
          to Floating-Point Values in PNG extensions
          document].  This is the physical value of "y"
          corresponding to the top edge of the image.
1 byte:   null separator
ys bytes: Y-calibration (ASCII text).  The distance
          corresponding to the height of a pixel.  Must
          be non-zero.  The positive direction is
          downward.
There is no trailing zero for the final string.
The "purpose" identifies the x-calibration, which can permit applications or people to choose the appropriate one when more than one x-calibration is stored in a multiple-image file. The "purpose" string must follow the format of a "tEXt" keyword, i.e. 1-79 printable Latin-1 characters.
The algorithm for finding the physical y-value of the middle of a pixel is
physical_y_value := Yoffset + Ycalibration * (row_number + 0.5)If present, the "yySC" chunk must appear before the first "IDAT" chunk. Only one instance of the "yySC" chunk is permitted in a PNG stream.