-
-
Notifications
You must be signed in to change notification settings - Fork 851
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
"System.NotSupportedException: ccitt extensions are not supported" when loading some tifs #2451
Comments
Thanks for the files and details. I'll have a look at how libtiff handles these compression types asap. Hopefully an easy port. Re the commercial license. As of v3 there's no support guarantees with the commercial license. |
@JimBobSquarePants The provided image Epson_1411_1 uses CCITT Group 4 compression. The last row (2198) does not contain enough data. It seems it has a premature end of line code. I think we can treat all pixels as white if that's happening. The problem is the it is that the EOL code (12 bits first 11 all 0 with the last one being 1) is ambiguous with the Extensions1D code (7 bits with all zero's). Not sure yet how we can detect its meant to be EOL. |
@brianpopow Thanks for the information. I hadn't started digging yet. Yeah that seems like a bit of a puzzle. It might be worth seeing how other libraries handle it. Maybe libtiff.NET would be easy to compare? |
Thanks in advance.
I don't know if I understood correctly. But then how should we proceed to have guaranteed support even with v3? Should we update our license somehow? |
@JimBobSquarePants I would suggest the following: If we encounter a Extensions1D code, we read the next 5 bits and if it turns out to be a EOL and not a Extensions1D, we return that. Otherwise throw a NotSupported Exception for the Extension1D code. @joaovsoares can we use the provided images for unit tests? |
Unfortunately, in this case you cannot use these images for unit tests. |
@joaovsoares yes you can delete them, I have downloaded them. Would you be able to provide other images with the same issue, which I could use? It will be hard to recreate those issue, because I think they are not following the spec correctly. |
I will try. I just requested sample images that can be used publicly. |
Let's push on with the fix using the original images to test locally. We can add a note to the code if we cannot recreate the issues in a new file. |
Thanks, guys. |
Tiff: ccitt compression, fix for issue #2451
Prerequisites
DEBUG
andRELEASE
modeImageSharp version
3.0.2-alpha.0.14
Other ImageSharp packages and versions
No
Environment (Operating system, version and so on)
Linux
.NET Framework version
NET 6
Description
When loading some Tiffs, we received this exception while decoding.
Other windows applications can open the file.
BTW: I have bought a Commercial License (couldnt find the checkbox to inform).
Steps to Reproduce
Load the provided images from a stream.
The error throws when decoding.
Images
The text was updated successfully, but these errors were encountered: