Re: CFD: eXIf 2017-05-31

Glenn Randers-Pehrson <[email protected]> Fri, 9 Jun 2017 07:45:09 -0400
Newsgroups gmane.comp.graphics.png.general
Message-ID <CA+PdXcvNawuKO7sOaSo+=HDmw-ULPyNLD1C5HuE4S2=4UeFMAw@mail.gmail.com>
On Fri, Jun 9, 2017 at 7:31 AM, Phil Harvey <phil-CIeU6mJ2MbMd166Dz3SrqbDks+cytr/[email protected]> wrote:
> Hi Cosmin,
>
>> On Jun 8, 2017, at 10:33 PM, Cosmin Truta <[email protected]> wrote:
>>
>> Add:
>> + There are no size constraints upon the eXIf chunk size beyond those
>> + imposed by the PNG specification, i.e. maximum 2^31-1 bytes. However,
>> + applications may optionally impose a size constraint of maximum
>> + 2^16-1 bytes, for easy interchange with the JPEG format.
>
> Sounds good, except that since you are getting very specific about the
> JPEG size constraint, the actual maximum size is 2^16-9 bytes because
> you must leave space for the JPEG segment size word (2 bytes) and the
> JPEG Exif00 header (neither of which are part of the eXIf chunk, but
> both are included in the JPEG size word).

I think it's OK in CFD eXIf -2017-09a which says

While the PNG specification allows the chunk size to be as large as
2^31-1 bytes, decoders should be aware that, if the Exif profile is
written to a JPEG datastream, the total length of the Exif data (the
sum of the lengths of the Exif attributes IFD, the GPS IFD, the
thumbnail IFD, and the TIFF header) may need to be adjusted to not
exceed 2^16-2 bytes, so it can fit into a JPEG APP1 marker.

Glenn

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot