Re: CALL for DISCUSSION: eXIf 20170115 -- length

Glenn Randers-Pehrson <[email protected]> Tue, 17 Jan 2017 05:20:49 -0600
Newsgroups gmane.comp.graphics.png.general
Message-ID <CA+PdXcvjvA33-AVrzCkWXuGG42Gj_3_Bka8T_5JsyNo2ZPKxuA@mail.gmail.com>
Images from my Nikon B700 contain a small thumbnail in the Exif data, and
they also contain a larger preview with about 1Mpix -- it happens to be the
same image that's shown on the viewfinder and onboard display screen.  I
haven't figured out exactly where it resides in the file; ImageMagick does
not preserve it when copying the image.

Glenn

On Tue, Jan 17, 2017 at 12:37 AM, John Bowler <
[email protected]> wrote:

> On Mon, Jan 16, 2017 at 10:04 PM, Willem van Schaik <[email protected]>
> wrote:
> > and maybe we should add:
> >
> >    It will often end with 0xFFD9 (there could be a padding byte
> >    0x00) which is the EXIF EOI (End of Image) marker, because
> >    many EXIF profiles end with a thumbnail image.
>
> So far as I know there is no reason for the thumbnail to be at the end
> even though the CIPA document shows it there and there is no reason
> for the thumbnail to be a JPEG stream.  Indeed if the main image is
> uncompressed the thumbnail cannot be compressed while if the main
> image is compressed an uncompressed thumbnail may be used.
>
> See the discussion on page 24 of CIPA 2016.
>
> Some professional cameras (maybe all of them) offer TIFF as an output
> format.  Since those files are uncompressed conversion to PNG may be
> attractive.  The conversion has to add the JPEG "Exif\0\0" tag to the
> TIFF Exif information but that's relatively little cost (just 6 bytes)
> compared to the likely gain of the compression of the main image.  In
> those images the thumbnail could easily be anywhere; it has a fixed
> size.
>
> In any case a program which edits the image will probably reconstruct
> or discard the thumbnail; digikam does this even if it doesn't edit
> the image because it adds its own fields to the Exif metadata.  (Well,
> actually, I looked at the code - it reads the chunk in with exiv2 then
> writes it out using exiv2 which completely reconstructs it.)
>
> So far as I can see it isn't possible to rely on anything apart from
> the TIFF header being anywhere; it is necessary to read the IFDs and
> follow the pointers (offsets) to the relevant data.
>
> --
> 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
> _______________________________________________
> png-mng-misc mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/png-mng-misc
>

------------------------------------------------------------------------------
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