Roughsketch / imagesize

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

Hit end of file before finding size #10

Closed sudo-nice closed 4 years ago

sudo-nice commented 4 years ago

The error happens for this image.

Roughsketch commented 4 years ago

I can't figure out where the dimensions are for this image, so it looks like it's in some format that's not supported. Even searching in a hex editor I can't find them.

sudo-nice commented 4 years ago

identify (which is shipped with imagemagick) reports:

bf9c2c39b6.jpg JPEG 4980x3321 4980x3321+0+0 8-bit sRGB 1.88553MiB 0.000u 0:00.000
Roughsketch commented 4 years ago

Found the issue with exiftool. Looks like the SOF tag was FFC1 but I only look for C0 or C2. Will push a fix here soon.

Roughsketch commented 4 years ago

v0.8.5 released, all tests including that image are working with the change.

Thank you very much for the issue!

sudo-nice commented 4 years ago

That's really great, thanks a lot!

sudo-nice commented 4 years ago

I managed to hit the issue again, this time for this image.

sudo-nice commented 4 years ago

Thank you again.