Repository navigation
"System.NotSupportedException: ccitt extensions are not supported" when loading some tifs #2451
Description
Activity
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.
Reacted by João Victor Neves Monteiro Soares@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).
Since we are reading the data bit by bit, we read the EOL code as being Extensions1D.Not sure yet how we can detect its meant to be EOL.
Reacted by João Victor Neves Monteiro Soares@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?
...I'll have a look at how libtiff handles these compression types asap. Hopefully an easy port.
Thanks in advance.
Re the commercial license. As of v3 there's no support guarantees with the commercial license.
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?
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?
@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.
I can provide a fix, if this sounds like a valid plan.@joaovsoares can we use the provided images for unit tests?
@joaovsoares can we use the provided images for unit tests?
Unfortunately, in this case you cannot use these images for unit tests.
By the way, can I delete them from the first post? I assume you already downloaded it.@joaovsoares can we use the provided images for unit tests?
Unfortunately, in this case you cannot use these images for unit tests. By the way, can I delete them from the first post? I assume you already downloaded it.
@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.
@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.
Reacted by Brian PopowThanks, guys.
BTW: now @yuridiniz will follow up on the subject here with you, in my place.- added a commit that references this issue
on Jun 24, 2023 - added a commit that references this issue
on Jun 25, 2023
Prerequisites
DEBUGandRELEASEmodeImageSharp 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