Roughsketch / imagesize

Quickly probe the size of various image formats without reading the entire file.
MIT License
57 stars 12 forks source link

Can't get dimensions of the JPEG file #9

Closed sudo-nice closed 4 years ago

sudo-nice commented 4 years ago

Here is an offending image: https://i.imgur.com/nqkq8PO.jpg I was not sure if that's https://github.com/Roughsketch/imagesize/issues/2, so I filled this new issue.

P.S. Thank you for the great software!

Roughsketch commented 4 years ago

I took a look at it and it seems to be an issue with the way JPEGs were parsed. There were multiple sections in that image with FF FF <tag>, but the first FF would cause it to skip the actual tag since FF FF isn't a tag. This should be fixed now.

I also went ahead and ran a test on every image in my pictures directory and found one more JPEG related bug which is also fixed. I'll push 0.8.2 here soon.