Re: Endless gamma in eXIf 2017-0119

John Bowler <[email protected]>
Newsgroups gmane.comp.graphics.png.general
Message-ID <CAP7U399PCSLm5cL532rek_BVvAQCrt95WRzje_JXwZKsTF7bdA@mail.gmail.com>
There's some misunderstanding of what the "unsafe-to-copy" bit means.
It's explicitly specified to only be for "PNG editors" when the marked
chunk is unknown.  Section 14.2(b) of the spec mandates the handling
thus:

"If a chunk's safe-to-copy bit is 0, it indicates that the chunk
depends on the image data. If the program has made any changes to
critical chunks, including addition, modification, deletion, or
reordering of critical chunks, then unrecognized unsafe chunks shall
not be copied to the output PNG datastream. (Of course, if the program
does recognize the chunk, it can choose to output an appropriately
modified version.)"

So eXIF (unsafe to copy) is only deleted if a CRITICAL chunk is
changed.  In practice this means:

1) IHDR; cropping, pixel format changes.
2) PLTE: even if not required (technically).
3) IDAT: even just re-compression (technically).

Making eXIf, or zXIf, safe-to-copy doesn't fix the scenario in question.

The existing implementation with zTXt preserves EXIF on (1) and
programs like pngcrush and pngcp technically violate (2).

-- 
John Bowler <[email protected]>
+1 (541) 450-9885
PO BOX 3151
KERBY OR 97531-3151
USA

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.