Page 1 of 1

New PNG chunks: caNv and exIf

Posted: 2017-01-22T13:27:09-07:00
by glennrp
I've checked a new chunk handler into IM6 and IM7 that recognizes the "caNv" (canvas) chunk. This is intended to replace the existing vpAg (virtual page) chunk. The differences are (1) the caNv chunk contains its own offset values while vpAg relied upon the oFFs chunk to carry the offsets separately, and that sometimes interferes with other applications that also use the oFFs chunk, and (2) the new caNv chunk only operates with pixel units (there's no "units" field like the one in vpAg and oFFs). As with oFFs, the "+repage" option may be used to "forget" the offsets. The offsets survive when "-strip" is used.

Also, I've checked in implementation of the "exIf" chunk which is currently being discussed on the png-mng-misc@lists.sourceforge.net list. Currently it supports read/write of the exIf chunk but only read support for the eXIf chunk until the PNG group approves and registers eXIf. The function of the chunk is of course to store the Exif profile. Omitting the first six bytes ("Exif\0\0") which only have meaning to JPEG. Currently we're writing the Exif profile in both exIf chunk and as compressed hexcode in a zTXt chunk, but the latter will be deprecated once eXIf is approved.

There are some test images containing the exIf chunk at http://www.simplesystems.org/users/glennrp/eXIf/ from several different cameras.