ExifTool Forum

General => Metadata => Topic started by: quietdragon on September 12, 2011, 11:11:13 AM

Title: Thumbnail limits
Post by: quietdragon on September 12, 2011, 11:11:13 AM

$ ll /store/photo/DSC02003.thumb.JPG
-rw-r--r-- 1 photo media 64935 2011-09-12 07:55 /store/photo/DSC02003.thumb.JPG

$ ~/exiftool/Image-ExifTool-8.64/exiftool -P "-ThumbnailImage<=-" -o /tmp/DSC02003.thumb.JPG /tmp/DSC02003.JPG < /store/photo/DSC02003.thumb.JPG
Warning: ThumbnailImage not written (too large for JPEG segment) - /tmp/DSC02003.JPG
    1 image files created


From http://www.exif.org/Exif2-1.PDF

Quote
2.5.5. Basic Structure of Thumbnail Data
Thumbnail data is recorded in the 1st IFD similarly to primary images, using two existing image formats.
No limit is placed on the size of thumbnail images. Thumbnails are not mandatory, but it is recommended that they
be recorded if possible, unless hardware or other restrictions preclude this.

And then:

Quote
2.7.2.Interoperability Structure of APP1 in Compressed Data
APP1 consists of an APP1 marker indicating that it is an application area, a length code indicating its size, and
primary image attribute information patterned after the TIFF structure. The APP1 segment cannot record more than
64 Kbytes, a limitation that must be kept in mind when recording thumbnail images.


Is section 2.5.5 misleading when it claims that, "No limit is placed on the size of thumbnail images" ?
Title: Re: Thumbnail limits
Post by: Phil Harvey on September 12, 2011, 11:29:02 AM
Exif also applies to TIFF images, where there would be no such limit.  So section 2.5.5 is correct if it is referring to TIFF images.

BTW, I would suggest reading the current specification (Exif 2.3 (http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-008-2010_E.pdf)).