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

    Function canonSensorDiag

    • Canon sensor diagonal from the RAW FocalPlaneX/YResolution rationals.

      Canon writes the rational so that the numerator is pixel width * 1000 and the denominator is the sensor width in inches * 1000 (the quotient alone loses the physical size — see CalcSensorDiag in Canon.pm). The diagonal in mm is sqrt(denX^2 + denY^2) * 0.0254. Every bounds check below is exiftool's heuristic for "these rationals really follow the Canon convention"; if any fails we return undefined and the caller falls through to the focal-plane estimate. Known wrong for some EOS 20D / A310 / SD40 / IXUS 65 firmware.

      Inputs are the "num/den" strings stashed by the TIFF parser (FocalPlaneXResolutionRaw / FocalPlaneYResolutionRaw).

      Parameters

      • OptionalxRaw: string
      • OptionalyRaw: string

      Returns number | undefined