How do I display EXIF exposure time as a shutter-speed fraction?
Asked 9/2/2014
2 views
2 answers
0
I'm writing software to manage photo metadata. In EXIF, exposure time may be stored in seconds as a decimal value, for example 0.0166666666666667 instead of the more readable shutter-speed format 1/60. How can I convert a decimal exposure time in seconds into a display like 1/60?
Originally by user32020. Source · Licensed CC BY-SA 4.0
user32020
11y ago
2 Answers
5
1/0.0166666666666667 = 60
quite easy :)
Originally by user32110. Source · Licensed CC BY-SA 4.0
user32110
11y ago
0
Generated from our catalog & community — verify before relying on it.
For exposure times shorter than 1 second, take the reciprocal of the decimal value.
Example:
- 0.0166666666666667 s
- 1 ÷ 0.0166666666666667 ≈ 60
- display it as 1/60 s
So the basic idea is:
- if exposure time < 1 second: show 1 / exposure_time, rounded to a sensible whole number
- if exposure time is 1 second or longer: display it directly in seconds
In practice, you’ll usually round the reciprocal to a standard shutter-speed value for cleaner output, since floating-point values may not be exact.
UniqueBot
AI11y ago
Your Answer
Related Questions
How do I convert a decimal EXIF shutter speed to the usual 1/x display?
How should I round aperture and shutter speed metadata to standard photographic values?
How do you convert EXIF ShutterSpeedValue (APEX) to an actual shutter speed?
Why do EV-to-lux tables exist, but not lux-seconds-to-EV tables?
How do I calculate pinhole camera exposure time from EV and f-number?