EXIF 2.3 and Exiftool disagree about infinity and distance unknown?

Started by johnrellis, October 28, 2012, 06:02:07 PM

Previous topic - Next topic

johnrellis

EXIF 2.3 and Exiftool 9.03 don't seem to agree on how to represent infinity and distance unknown for SubjectDistance.  The EXIF 2.3 spec says:

QuoteSubjectDistance: The distance to the subject, given in meters. Note that if the numerator of the recorded value is FFFFFFFF.H, Infinity shall be indicated; and if the numerator is 0, Distance unknown shall be indicated.

Setting a value of "inf":

exiftool.exe -subjectdistance=inf 1.jpg

causes a rational value of 1/0 rather than a numerator of 0xFFFFFFFF to be stored in the file:



Exiftool interprets 0xFFFFFFFF/1 as 4294967295 rather than as "inf":



According to the spec, a rational value of 0/1 should be interpreted as "distance unknown", but Exiftool interprets it as 0:



I searched a fair bit but couldn't find any existing discussion about this.  Is this a known issue, or am I interpreting something wrong?  Thanks,

John



Phil Harvey

Hi John,

Nice catch.  I hadn't realized that the EXIF specification had a specific definition for an infinite value of some tags.  I see this is also true for BrightnessValue.  Wow.  What a bunch of dummies (the guys that wrote the EXIF spec).  By their definition, a BrightnessValue with a numerator of 0xfffffff should be interpreted as Unknown, which is complete horse shit.  This means that a BrightnessValue of -1 may not be represented as -1/1 because the signed integer representation of -1 if 0xffffffff.  Sorry for getting so worked up about this.  I need to calm down a bit and step away from this before I say something that I'll regret... :P

- Phil
...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 ($).