You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to extract a thumbnail from a JPG, but exifThumbnail.getInt(ExifThumbnailDirectory.TAG_THUMBNAIL_OFFSET) reports the wrong offset compared to exiftool, which has the correct value.
I tried this on multiple Unsplash photos like this one:
I'm certain the logic determining the thumbnail offset is broken.
The thumbnail length is correct.
The text was updated successfully, but these errors were encountered:
StefanOltmann
changed the title
TAG_THUMBNAIL_OFFSET reports wrong number
TAG_THUMBNAIL_OFFSET reports wrong value
Jun 2, 2022
Fixes#578
The offset is currently reported relative to the start of the Exif data. However, most users will need the value relative to the start of the outermost data stream. This change attempts to provide that value.
Should work for JPEG and RAW files. Won't work for Exif data embedded within other formats such as PNG, QuickTime, WebP or HEIF. Such support could be added in future.
Fixes#578
The offset is currently reported relative to the start of the Exif data. However, most users will need the value relative to the start of the outermost data stream. This change attempts to provide that value.
Should work for JPEG and RAW files. Won't work for Exif data embedded within other formats such as PNG, QuickTime, WebP or HEIF. Such support could be added in future.
I try to extract a thumbnail from a JPG, but
exifThumbnail.getInt(ExifThumbnailDirectory.TAG_THUMBNAIL_OFFSET)
reports the wrong offset compared toexiftool
, which has the correct value.I tried this on multiple Unsplash photos like this one:

I'm certain the logic determining the thumbnail offset is broken.
The thumbnail length is correct.
The text was updated successfully, but these errors were encountered: