Skip to content
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

Unable to read CMYK 96-bit image #104

Open
poquta opened this issue Feb 13, 2024 · 0 comments
Open

Unable to read CMYK 96-bit image #104

poquta opened this issue Feb 13, 2024 · 0 comments

Comments

@poquta
Copy link

poquta commented Feb 13, 2024

Explanation: The image in CMYK 96-bit format cannot be read properly. ReadRGBAImageOriented returns false, despite the image being supported by most editors.

Code sample:

 using (Tiff image = Tiff.Open(@"TestImage FormaTif96bit_CMYK_NoCompression_SWOP.tif", "r"))
 {
                FieldValue[] value = image.GetField(TiffTag.IMAGEWIDTH);
                int width = value[0].ToInt();

                value = image.GetField(TiffTag.IMAGELENGTH);
                int height = value[0].ToInt();

                int imageSize = height * width;
                int[] raster = new int[imageSize];

                if (!image.ReadRGBAImage(width, height, raster))
                {
                    // Not expected result!
                }
}

TestImage FormaTif96bit_CMYK_NoCompression_SWOP.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant