-
-
Notifications
You must be signed in to change notification settings - Fork 850
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
Simple conversion of Tiff file to PNG or JPG generates a strange result, even, at certain times, it is in 3D perspective #2679
Comments
The expected decoded image It actually looks like this from the main branch: The tiffinfo is:
So this is a jpeg compressed tiff image. The image decodes correctly, if we set the ycbcrSubSampling to 1, 1 instead of 2, 2, since this is already handled by the jpeg decoding part. |
Does the tag specifically state the subsampling is 2, 2? https://www.awaresystems.be/imaging/tiff/tifftags/ycbcrsubsampling.html |
Yes YCbCrSubSampling is [2, 2] here in the example image |
I had another dig through our Tiff code (I really do not enjoy how complicated it is to follow) and it appears to me that our jpeg scan decoder is already handling the deinterleaving so we can treat the subsampling as [1, 1] when using the jpeg decoder. |
Ok, thanks for confirming. I think what makes it so complicated is the myriads of possible combinations of compressions, pixelformats and colorspaces. When ever I think now we finally covered all possible combinations someone comes up with a new tiff variant. I will try to make a fix for that. @yuridiniz Is it ok, if we use your testimage in a unit-test? |
TIFF stands for Thousands of Incompatible File Formats! Not helpful but couldn't help myself ;) |
Since #2789 was merged, I will close this now as completed |
Prerequisites
DEBUG
andRELEASE
modeImageSharp version
3.1.2
Other ImageSharp packages and versions
No
Environment (Operating system, version and so on)
Linux / Windows
.NET Framework version
.NET 6
Description
I have attached the images that are generating this behavior
Steps to Reproduce
O problema ocorreu em uma imagem específica, segue código mínimo para reprodução:
Images
Img.zip
The text was updated successfully, but these errors were encountered: