Re: EXIF support in PNG
Cosmin Truta <[email protected]>
| Newsgroups | gmane.comp.graphics.png.general |
|---|---|
| Message-ID | <CAAoVtZwD_aGbEbygLOScAD1CSwsG0t3vtRvR=1H8fWVBFHaQEw@mail.gmail.com> |
Glenn Randers-Pehrson wrote: > How about always having the compression_method byte > > 0: zlib compression > 1: uncompressed > > Cameras could use 1 for encoding speed, optimizers could > compress the data and set it to 0 afterwards. I agree with Glenn's rationale, but I'd like to make it consistent with the existing PNG practice, e.g. as in iTXt. Chunk length: 4 bytes: 4 + 2 + N Chunk type: 4 bytes: "eXIf" Chunk data: * Offset 0: 1 byte: compression flag ==> 0 for uncompressed, 1 for compressed, >1 is invalid * Offset 1: 1 byte: compression method ==> 0 for zlib datastream with deflate compression * Offset 2: N bytes: the EXIF blob My proposal takes one extra byte, but it allows correct PNG format expansion, if at any time in the future one or more more compression methods get added (besides just deflate, which is compression method number zero). Sincerely, Cosmin ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot