27 Messages
•
378 Points
Fri, Apr 29, 2011 10:35 AM
Lightroom: EXIF metadata SubjectDistance bug
Hi.
I've just discovered that Lightromm 3.4 and earlier wrongly displays SubjectDistance EXIF tag if camera focus distance was set to infinity.
According to EXIF specification SubjectDistance tag is stored using two numbers - numerator and denominator.
And if numerator is zero - subject distance should be reported as unknown and if it is set to 0xFFFFFFFF - subject distance is infinity.
Quote from EXIF 2.2 specification:
SubjectDistance:
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.
But instead of displaying infinity - lightroom shows numeric value.
For example, in my photo I have numerator equal to 0xFFFFFFFF and denominator equal to 1000.
Lightroom reports distance of 4.29 Mm (million of meters 0xFFFFFFFF/1000 = 4294967295/1000 = 4.29*10^6), which is numerically right, but should be reported as infinity.
At the moment, Lightroom shows infinity ONLY if the numerator is 0xFFFFFFFF AND denominator is 1, which is wrong.
According to EXIF specification, if the numerator is 0xFFFFFFFF - denominator does not matter at all.
I've just discovered that Lightromm 3.4 and earlier wrongly displays SubjectDistance EXIF tag if camera focus distance was set to infinity.
According to EXIF specification SubjectDistance tag is stored using two numbers - numerator and denominator.
And if numerator is zero - subject distance should be reported as unknown and if it is set to 0xFFFFFFFF - subject distance is infinity.
Quote from EXIF 2.2 specification:
SubjectDistance:
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.
But instead of displaying infinity - lightroom shows numeric value.
For example, in my photo I have numerator equal to 0xFFFFFFFF and denominator equal to 1000.
Lightroom reports distance of 4.29 Mm (million of meters 0xFFFFFFFF/1000 = 4294967295/1000 = 4.29*10^6), which is numerically right, but should be reported as infinity.
At the moment, Lightroom shows infinity ONLY if the numerator is 0xFFFFFFFF AND denominator is 1, which is wrong.
According to EXIF specification, if the numerator is 0xFFFFFFFF - denominator does not matter at all.
Problems
•
Updated
10 years ago
3
6
Helpful Widget
How can we improve?
Tags
No tags available
Responses
mark_sirota
142 Messages
•
3.7K Points
10 years ago
Interestingly, exiftool shows smaller numbers for FocusDistance than Lightroom does -- I have two examples. In both, LR shows ∞ while exiftool shows 3.98m and 18.84m. But after viewing a few more that I'd think were shot at ∞ I'm not sure I trust exiftool on this.
I'm not sure how to view the raw data easily so that I can see the numerator and denominator separately. What are you using?
2
0
shad0w
27 Messages
•
378 Points
10 years ago
But you can use dng_validate tool from adobe dng sdk (available for free).
Run it as dng_validate -v raw_file.dng and it will show you something like this:
SubjectDistance: 14/2
To test Lightroom you can use exiftool.
Note 0xFFFFFFFF = 4294967295
Execute "exiftool -SubjectDistance=4294967295/1 raw_file.dng" -> lightroom will show infinity.
But if you run "exiftool -SubjectDistance=4294967295/1000 raw_file.dng" -> it will show you millions of meters instead of infinity.
0
0
benjamin_warde
Employee
•
478 Messages
•
10.7K Points
10 years ago
Thanks,
Ben
0
0
mark_sirota
142 Messages
•
3.7K Points
10 years ago
1
0
benjamin_warde
Employee
•
478 Messages
•
10.7K Points
10 years ago
0
0
mark_sirota
142 Messages
•
3.7K Points
10 years ago
0
0