-
Notifications
You must be signed in to change notification settings - Fork 975
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
Support YUV422 input #40
Comments
The error message is inaccurate. This is indeed a valid JPEG file, albeit a weird one:
This indicates that this image is not exactly YUV420:
For my own curiosity, could you say more about the software that produced that image (e.g. what model of a phone it was)? |
The EXIF only mentions |
If it helps testing, here are four examples exhibiting the same behavior, each from a different brand of camera (Sony, Canon, Panasonic, and Theta): https://github.com/wildpeaks/example-guetzli-photos |
I'll add that I'm getting the same error with JPEG pictures straight from my DSLR.
|
I see the same error from a Nikon D7200 (using a build on OS X): sample image. |
Same error here on a Nikon D200, D300, and D7200. Also fails on images saved from GIMP 2.8.14 under Fedora Core 20. Slightly different output for GIMP images: Start Of Frame 0xc2: width=3872, height=2592, components=3 |
@alecperkins Your sample image file also had some fascinating stuff embedded inside:
|
@asm-man We know that the problem is the 2x1,1x1,1x1 downsampling used in these images. |
@robryk Oh, right, thanks for that. It just seemed possible that the other weird stuff in the files might be at fault. Cheers. |
@asm-man Got the same error for the stripped down file you shared. |
I acknowledge that the error shouldn't occur if the image is valid, but you're unlikely to see as good a result re-encoding a JPEG image which has already been encoded with something else - you might see a slightly smaller file, but best case scenario for image quality is 'only slightly worse than input'. Ideally this would be used on images which have not undergone lossy compression. |
I got the same error for v1.0 under alpine linux with a photo taken with the Sony Alpha 6000 Camera is set to best quality JPEG Output. Test-Image: Exif:
|
@Smilebags Many cameras produce a JPEG. It's not an ideal situation, but it's what we have to live with. @everyone: Thanks for all the examples. I know why it's happening and don't need more examples. The current workaround is to first convert to a PNG. |
Yes, and the jpeg encoding in cameras generally isn't very good. Shoot raw and bring it into editing software uncompressed to convert to PNG. |
This pertains to google#40
I guess the recent commit provides better error message and the suggested workaround. |
Let's leave this issue open as an FR to actually support these images. |
This is the image:

./guetzli_linux_x86-64 image.jpg output.jpg
gives the error:Is the JPEG file really invalid? What qualifies as invalid or valid? The image above came directly from a an android phone's camera.
The text was updated successfully, but these errors were encountered: