0

I'm using from PIL import Image, ExifTags to access exif data of images.

exif.get('ExposureTime') returns 0.008 but I would like it expressed as 1/125. I can see this value under the ExposureTime dict. But how do I access it?

Spatial Digger
  • 1,549
  • 1
  • 13
  • 26
  • 1
    post some code... perhaps how you can 'see it'? if it's just a dict it should be pretty easy to get it. – 2e0byo Jan 26 '22 at 16:17
  • 1
    Does [this](https://stackoverflow.com/questions/23344185/how-to-convert-a-decimal-number-into-fraction) help? – 0x263A Jan 26 '22 at 16:19
  • 0.008 are the **amount in seconds** that the exposure took, which gives 1/125 **fractions of a second**. Basically you want convert seconds in fractions of a second. – Fusseldieb Jan 26 '22 at 17:05
  • In Pycharm I see `ExposureTime` dict with a value of `0.008` yes the decimal of 1/125. Within the dict, labelled `real` is the value 1/125. For different images the value will be different. – Spatial Digger Jan 26 '22 at 18:35

0 Answers0