ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: johnrellis on October 28, 2012, 06:02:07 PM

Title: EXIF 2.3 and Exiftool disagree about infinity and distance unknown?
Post by: johnrellis on October 28, 2012, 06:02:07 PM
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:

(http://www.pixentral.com/hosted/1c01siKY0TmSaGwZOa1XDUCvH4y1_thumb.png) (http://www.pixentral.com/show.php?picture=1c01siKY0TmSaGwZOa1XDUCvH4y1)

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

(http://www.pixentral.com/hosted/19yRmsXheXpK3FRSjbSNSy414thCy_thumb.png) (http://www.pixentral.com/show.php?picture=19yRmsXheXpK3FRSjbSNSy414thCy)

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

(http://www.pixentral.com/hosted/1e1E4dLiMcH2zbsxAV5ERK6R3x66oN0_thumb.png) (http://www.pixentral.com/show.php?picture=1e1E4dLiMcH2zbsxAV5ERK6R3x66oN0)

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


Title: Re: EXIF 2.3 and Exiftool disagree about infinity and distance unknown?
Post by: Phil Harvey on October 28, 2012, 06:30:20 PM
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