Main Menu

Thumbnail limits

Started by quietdragon, September 12, 2011, 11:11:13 AM

Previous topic - Next topic

quietdragon


$ 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" ?

Phil Harvey

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

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).