Open ghost opened 2 years ago
Changing toSimpleString
can negatively impact other property descriptions. For example:
diff --git a/heic/metadata/java/Issue 263 dotnet.heic.txt b/heic/metadata/java/Issue 263 dotnet.heic.txt
index f1caa71c..14e9e6f9 100644
--- a/heic/metadata/java/Issue 263 dotnet.heic.txt
+++ b/heic/metadata/java/Issue 263 dotnet.heic.txt
@@ -73,7 +73,7 @@ TYPE: HEIF
[Exif SubIFD - 0xa404] Digital Zoom Ratio = 1.1
[Exif SubIFD - 0xa405] Focal Length 35 = 28 mm
[Exif SubIFD - 0xa406] Scene Capture Type = Standard
-[Exif SubIFD - 0xa432] Lens Specification = 4.25mm f/1.8
+[Exif SubIFD - 0xa432] Lens Specification = 17/4mm f/1.8
[Exif SubIFD - 0xa433] Lens Make = Apple
[Exif SubIFD - 0xa434] Lens Model = iPhone XR back camera 4.25mm f/1.8
I don't think there's a one-size-fits-all here. For focal length, decimals feel more natural. For shutter and aperture, rationals feel more natural.
To improve this I'd suggest a fix in the descriptor for only the ExifSubIFDDirectory.TAG_EXPOSURE_TIME
tag.
This photo.jpg (part of the free Unsplash image set) was taken with an exposure time of 1/25
This sample code reports the exposure time as
0.04 sec
:I assume there is a problem with
Rational.toSimpleString()
Using this Kotlin method I get the expected string
1/25
: