New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with a JPG file #1182
Comments
The file contains unknown data after the image data; stb_image sees this as corruption (it's more conservative about accepting such images than other loaders). Looks like to be the same issue as this: jpeg-js/jpeg-js#81 |
Since the Internet does not seem to have any documented explanation for JPEG marker 0, I'm going to consider this a broken image and not fix it. See the above issue for more detailed argument. |
Could you share an image with us, which you can not open in Photopea? |
@nothings could you maybe add 2 lines of code to deal with this bug in JPG files? There are hundreds of thousands of such images out there, and since most of programs can open them, it would be nice if your library could handle them (as people are expecting it). |
@nothings also, my first image contains just one marker 0xFFD9, and that is the last two bytes of a binary file. What do you mean by "unknown data after the image data"? Also, I can not see any marker 0 in the file. |
@photopea I haven't tried photopea, I ran into the error using instant-ngp. Here's an example image that won't load with stb (assuming github doesn't strip the EXIF). |
I was not able to parse this JPG file correctly with your JPEG decoder. Could you fix it?
The text was updated successfully, but these errors were encountered: