Skip to content

Conversation

@ghosttie
Copy link

TIF images with Photometric.MINISBLACK are being extracted with their colors negated (white is black and black is white).

I think this is because TIFs with the Photometric tag set to MINISBLACK have their image data negated and System.Drawing.Bitmap doesn't appear to allow setting this, so it displays the data as-is, which is negated.

The only way I've found to fix this is to negate the image data in ImageFromCCITTFaxDecode if CCITTFaxDecodeParameters.BlackIs1 is false.

This should fix the issues complaining about this problem - #6 and #8

@husaft
Copy link

husaft commented Dec 9, 2022

Hi, I've got a modern fork github.com/Open-Inventions/PDFSharp.Extensions with ImageSharp and .NET 6 if you are interested.

@ghosttie
Copy link
Author

@husaft any chance of getting your fork as a NuGet package?

@husaft
Copy link

husaft commented Dec 26, 2022

@husaft any chance of getting your fork as a NuGet package?

Yes, it's now in https://www.nuget.org/packages/PdfSharpCore.Extensions !

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

Successfully merging this pull request may close these issues.

2 participants