You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Other image processing tools like imagemagick can handle the image just fine, and a simple convert faulty.jpg notfaulty.jpg fixes the issue, but I am wondering if there is a way I can deal with this type of image directly anyways.
For context, the images are generated by a scanner when scanning to pdf. When I use the pdf crate to iterate over the images and try to use the image crate to make them accessible, I get the error above. Digging deeper, image uses zune to decode the image and when I use zune directly to decode this image, I get the same error, so that's why I'm asking here.
Roughly speaking I'm encountering this error at around 60% of images scanned with that scanner, always with a "Unknown marker 0xFF??" error where the last byte seems random to me.
If you have any idea how I could decode those image straight within rust anyways, that would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Hi there!
I am trying to deal with JPG files that seem to be faulty, notably for images like the one attached which fails with
(DecodingError { format: Exact(Jpeg), underlying: Some("Unknown marker 0xFF7F") }
Other image processing tools like imagemagick can handle the image just fine, and a simple
convert faulty.jpg notfaulty.jpg
fixes the issue, but I am wondering if there is a way I can deal with this type of image directly anyways.For context, the images are generated by a scanner when scanning to pdf. When I use the pdf crate to iterate over the images and try to use the image crate to make them accessible, I get the error above. Digging deeper, image uses zune to decode the image and when I use zune directly to decode this image, I get the same error, so that's why I'm asking here.
Roughly speaking I'm encountering this error at around 60% of images scanned with that scanner, always with a "Unknown marker 0xFF??" error where the last byte seems random to me.
If you have any idea how I could decode those image straight within rust anyways, that would be greatly appreciated.
The text was updated successfully, but these errors were encountered: