mattiasw / ExifReader

A JavaScript Exif info parser.
Mozilla Public License 2.0
737 stars 88 forks source link

lens_specification read value overflow #320

Closed besscroft closed 2 months ago

besscroft commented 3 months ago

Description

lens_specification read value overflow

Additional details

Example Image File 20240325-DSC_0399 (1)

What I expected would happen: "16-50 mm f/6.3"

What really happened: image

Finally, thank you for your work. I hope you can help me figure out the problem, thank you!

mattiasw commented 3 months ago

Hi!

That looks like the common JavaScript problem with floating-point number representation, the reason that also makes 0.1 + 0.2 = 0.30000000000000004.

I'll see if I can add some code to detect when it happens and round it.

mattiasw commented 2 months ago

Fixed and released as version 4.23.3.