JPEG IDF Structure - use of Image and Photo
Added by Martin Harran over 6 years ago
I'm doing a forensics project on JPEGS where I look at the Exif data as part of the overall structure. The IDFs in the JPEG structure are commonly referred to as IDFn, Exif, Interop and GPS.
I'm assuming in Exiv2 that Iop and GPSInfo simply map to Interop and GPS but the 'Image' and 'Photo' IDFs aren't quite so clear. Is there, for example, any direct mapping to IDF0 and the Exif IFD?
Also I notice each of those IFDs have unique tags but they also have common tags. For example, 0x8829 - 0x882b are unique to Image, 0x8830 - 0x8835 are unique to Photo but 0x9201 - 0x920a are coomon to both.
Can someone explain the underlying logic used or if it is covered in the documentation, please point me in that direction.
Replies (5)
RE: JPEG IDF Structure - use of Image and Photo - Added by Martin Harran over 6 years ago
Senior moment - all references to IDF should of course be IFD :(
RE: JPEG IDF Structure - use of Image and Photo - Added by Alan Pater over 6 years ago
Interesting question. I am not expert of the structure of exif data but find that there are indeed 2 places in the exiv2 code that these tags occur.
For instance, ShutterSpeedValue:
TagInfo(0x9201, "ShutterSpeedValue", N_("Shutter Speed Value"), N_("Shutter speed."), ifd0Id, tiffEp, signedRational, 1, print0x9201), // TIFF/EP tag http://dev.exiv2.org/projects/exiv2/repository/entry/trunk/src/tags.cpp#L826 TagInfo(0x9201, "ShutterSpeedValue", N_("Shutter speed"), N_("Shutter speed. The unit is the APEX (Additive System of Photographic Exposure) setting."), exifId, captureCond, signedRational, 1, print0x9201), http://dev.exiv2.org/projects/exiv2/repository/entry/trunk/src/tags.cpp#L1630
The first is mentioned as a "TIFF/EP tag", the second as EXIF/ID.
RE: JPEG IDF Structure - use of Image and Photo - Added by Andreas Huggel over 6 years ago
Each of the standard IFDs is mapped to a middle name of the Exiv2 Exif keys:
IFD0 - Image
IFD1 - Thumbnail
Exif - Photo
Interop - Iop
GPS - GPSInfo
See groupInfo[] in tags.cpp for the entire list. For example, the Exiv2 key "Exif.Image.ImageWidth" refers to Exif tag ImageWidth (tag number 0x0100) in IFD0. The tag reference tables http://www.exiv2.org/metadata.html list all the tags that Exiv2 knows.
As for the tag numbers, each IFD can contain tags 0x0001 to 0xffff. Refer to the Exif standard for the meaning of each standard tag in each of the standard IFDs (which contains essentially what you find in the Exiv2 tag reference tables for the standard Exif tags). Tags with the same number but in different IFDs are totally unrelated with each other.
Andreas
RE: JPEG IDF Structure - use of Image and Photo - Added by Martin Harran over 6 years ago
That's great, Alex, thanks.
RE: JPEG IDF Structure - use of Image and Photo - Added by Martin Harran over 6 years ago
Oops - Thanks Andreas - I seem to be having a few senior moments today, maybe a sign that I've spent enough time for one day perusing Exif tags :)