ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: mikio on October 05, 2018, 03:15:11 AM

Title: ApproximateFocusDistance is not used for computing the DOF tag
Post by: mikio on October 05, 2018, 03:15:11 AM
Hi,
I noticed that ApproximateFocusDistance was not used for computing DOF.
Checking the source code Exif.pm, I locate the bug.

    DOF => {
        Description => 'Depth Of Field',
        Notes => 'this value may be incorrect if the image has been resized',
        Require => {
            0 => 'FocalLength',
            1 => 'Aperture',
            2 => 'CircleOfConfusion',
        },
        Desire => {
            3 => 'FocusDistance',   # focus distance in metres (0 is infinity)
            4 => 'SubjectDistance',
            5 => 'ObjectDistance',
            6 => 'ApproximateFocusDistance ',
            7 => 'FocusDistanceLower',
            8 => 'FocusDistanceUpper',
        },
        ValueConv => q{


There, a whitespace is trailing ApproximateFocusDistance. When I removed it, it worked.
The version I checked was the current latest (11.12).
Thanks for the great tool, anyway.
Title: Re: ApproximateFocusDistance is not used for computing the DOF tag
Post by: Phil Harvey on October 05, 2018, 07:52:20 AM
Nice catch!  Thanks!!

This will be fixed in 11.13.

- Phil