@woss/exiftool - v0.3.1
    Preparing search index...

    Function calcDOF

    • Depth of field string in ExifTool's exact PrintConv shape, e.g. "2.53 m (2.45 - 2.62 m)". Returns undefined when the input is insufficient.

      Focus distance priority: FocusDistance -> SubjectDistance -> (we don't parse ObjectDistance / ApproximateFocusDistance / FocusDistanceLower/Upper). Two subtleties preserved from Exif.pm:

      • far < 0 means the hyperfocal sits inside the focus distance: ExifTool renders far as 0 and the PrintConv turns that into "inf";
      • the depth uses THREE decimals when it is under 0.02 m (macro shots print "0.001 m (0.300 - 0.300 m)" instead of collapsing to "0.00").

      Parameters

      • focalLength: number
      • aperture: number
      • coc: number
      • subjectDistanceMetres: number | undefined

      Returns string | undefined