Re: [libpng:feature-requests] #32 Modern compressor
John Bowler <[email protected]>
| Newsgroups | gmane.comp.graphics.png.general |
|---|---|
| Message-ID | <CAP7U39-LDMrnpAgBWgMNAH-SpE8H0nofONsTuGOstw4b9FKS2g@mail.gmail.com> |
On Sat, Dec 31, 2016 at 6:27 AM, Glenn Randers-Pehrson <[email protected]> wrote: > In either code, the zTXt chunk actually contains the raw profile, > hex-encoded. > The hex-encoding isn't a terribly efficient way of storing the data (I > recall that > Mark was horrified when I first proposed it), but the zTXt compression > helps > with that. > I'm proposing simply adopting a new chunk 'eXIf' which contains the raw profile, no keywords, no compression. The justification for that is that it is trivial to handle for an existing app using even the crusty libpng 1.2 that seems to be distributed with Ubuntu(!) Because the EXIF data is there in original encoding it's very easy to extract from a PNG; scan through the file for a chunk named eXIf, the preceding four bytes (chunk length) give the data length, the data follows "eXIf" with a 4 byte CRC32 after that. In libpng the 'unknown chunk' mechanism automatically stores the data in memory and png_get_unkown_chunks returns an array of C structs each containing the name (ASCII "eXIf" for the EXIF data), a pointer to the data and then the size of the data. The eXIf data would be speced to be the same as currently encoded in the JPEG APP marker, or anything backward compatible with it; I have to admit a brief search for EXIF failed to reveal the relevant information. John Bowler ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ png-mng-misc mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/png-mng-misc