Re: CALL for DISCUSSION: eXIf 20170115 -- length

John Bowler <[email protected]>
Newsgroups gmane.comp.graphics.png.general
Message-ID <CAP7U399+3gnBKR+-vJspV7A8jw-QjV2LTsb6OqEOAU+3fGyTXg@mail.gmail.com>
On Tue, Jan 17, 2017 at 3:20 AM, Glenn Randers-Pehrson
<[email protected]> wrote:
> 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.

It's in an APP2 marker isn't it?  The APP2 marker is used in EXIF to
hold the "EXIF extended data" which is actually FlashPix data and can
be much larger than 64KiB; EXIF allows the FPX APP2 to be repeated.

In this case, however, it may be a proprietary preview; it just
depends on the signature at the start of the JPEG marker.

If you run my "jpegdump" program on it it will reveal what APPn
markers are there and what IFDs are in the EXIF APP1 segment (I find
this much more useful that the reduced output of exiftool or the exiv2
exif command).  jpegdump doesn't, however, understand the FlashPix
APP2.

EXIF restricts APP1 to just one instance and therefore to a maximum of
65535-8 bytes; CIPA 2016 points out that this limits the thumbnail
size.

GraphicsMagick "convert" and my jpegtopng conversion simply preserve
the whole APP1 segment (less JPEG marker and length), so if the second
image goes it isn't in there.  Digikam reads the APP1 and writes a new
Exif (zTXt compressed) chunk into the PNG so it can get changed a lot.
-- 
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.