Code Monkey home page Code Monkey logo

Comments (9)

edwardhorsford avatar edwardhorsford commented on July 28, 2024 1

Have upgraded locally and can confirm for my above image the time is now showing as 1.5s. Closing this as resolved.

from exifreader.

mattiasw avatar mattiasw commented on July 28, 2024

Hi! I seem to have no test images with this kind of exposure time. That could be why I haven't noticed it before. So it would be helpful to get an example picture. Feel free to crop to 1x1 and remove any sensitive metadata.

from exifreader.

edwardhorsford avatar edwardhorsford commented on July 28, 2024

Thanks for looking at this so quickly!

Attaching an example image with 1.5s exposure time.
ENMH_D800_44176

from exifreader.

edwardhorsford avatar edwardhorsford commented on July 28, 2024

It seems like most times under 1s are expressed as rational expressions of 1/x. I've now logged out all images where tags['ExposureTime'].value[0] !== 1 - and have a case of the description being wrong below 1s too:

{ id: 33434, value: [ 8, 10 ], description: '1/1' }

I think this should probably have a value of 0.8?

Thinking about it more, I suspect this bug might exist for all values > 0.5s and <2s? Or possibly any time over 0.5s where it's not a whole number of seconds?

from exifreader.

mattiasw avatar mattiasw commented on July 28, 2024

Yeah, that's deliberate. It's a bit tricky to guess how people want this value to be represented. From earlier discussions, values below 1 have been preferred to be expressed like 1/800 e.g. The issue with that is that the 800 is not always exactly 800, so there is some rounding (I think there was a good example where this was wanted). If it's smaller numbers this will get weird as you've noticed. If I'm uncertain I usually try to mimic how exiftool does this but you are showing numbers I haven't come in contact with before. :-) It would be great if you could run your images with weird descriptions through exiftool (exiftool -G image.jpg) and look at the [EXIF] value for Exposure Time and post the results here. I did it for the image above and it unsurprisingly gives me 1.5. This seems like an obvious change to make. But it would be nice to have a good set of rules for the other situations too.

from exifreader.

edwardhorsford avatar edwardhorsford commented on July 28, 2024

Sure thing! Exif tool gives:

[EXIF]          Exposure Time                   : 0.8

FWIW, for anything above 0.5s I don't think you can reasonably output a fraction - 4/5s just doesn't sound right - I think all cameras would say 0.8s. I suspect you could remove all rounding for any times over 0.5s?

from exifreader.

mattiasw avatar mattiasw commented on July 28, 2024

Let's try that. There is a PR now if you want to have a look: #271

from exifreader.

mattiasw avatar mattiasw commented on July 28, 2024

Busy week. But now this is published as version 4.21.0. See PR for more details: #271

from exifreader.

edwardhorsford avatar edwardhorsford commented on July 28, 2024

Thanks for resolving this so quickly!

from exifreader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.