Comments (9)
Have upgraded locally and can confirm for my above image the time is now showing as 1.5s. Closing this as resolved.
from exifreader.
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.
Thanks for looking at this so quickly!
Attaching an example image with 1.5s exposure time.
from exifreader.
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.
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.
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.
Let's try that. There is a PR now if you want to have a look: #271
from exifreader.
Busy week. But now this is published as version 4.21.0. See PR for more details: #271
from exifreader.
Thanks for resolving this so quickly!
from exifreader.
Related Issues (20)
- Exception is thrown when reading tags from an image HOT 5
- Possible to add support for protocols other than http? Or bypass to allow another protocol? HOT 3
- Custom build failures for Yarn Berry HOT 2
- Custom build installs excessive dependencies HOT 5
- (Not An Issue) How to remove metadata and Update the buffer HOT 1
- Typescript types for GIF support HOT 2
- Webpack error when attemping to use custom build HOT 3
- Newbie question: why are scalar exif properties (like DateTimeOriginal and most others) returned as string arrays? HOT 3
- Feature request: AVIF format HOT 5
- Feature Request: Support for MOV, MP4, etc HOT 1
- exif-reader.d.ts's NumberArrayTag type for GPSLatitude & GPSLongitude should be number[][] rather than number[] HOT 1
- Error with image in AVIF format HOT 1
- The width and height of the image are incorrectly obtained HOT 1
- Lens model doesn't seem to be parsed correctly HOT 8
- How to extract metadata from HTMLImageElement? HOT 2
- fileExif.exif.GPSLatitude value vs description HOT 2
- lens_specification read value overflow HOT 2
- `zTXt` tag values are decoded incorrectly HOT 7
- How to get raw exif data? HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exifreader.