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

AI Answer

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

AI

11y ago

Your Answer