New PNG chunks: caNv and exIf

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

New PNG chunks: caNv and exIf

Post 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.
Post Reply