From 53e6cb1da40ac130133b35276dd57eb8b88fdd64 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Tue, 10 Oct 2023 15:45:55 -0500 Subject: [PATCH] Exclude small exposure compensation values --- src/utility/exif.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utility/exif.ts b/src/utility/exif.ts index 9f05e46a..ff19ecde 100644 --- a/src/utility/exif.ts +++ b/src/utility/exif.ts @@ -36,7 +36,10 @@ const fractionForDecimal = (decimal: number, fractionCharacter?: boolean) => { }; export const formatExposureCompensation = (exposureCompensation?: number) => { - if (exposureCompensation) { + if ( + exposureCompensation !== undefined && + Math.abs(exposureCompensation) >= 0.33 + ) { const decimal = exposureCompensation % 1; const whole = Math.abs(exposureCompensation - decimal); const fraction = fractionForDecimal(decimal);