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

GetThumbnailImage does not preserve transparency #8

Open
GoogleCodeExporter opened this issue Oct 23, 2015 · 1 comment
Open

GetThumbnailImage does not preserve transparency #8

GoogleCodeExporter opened this issue Oct 23, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

If you start with a PNG that has a transparent background and run it through 
GetThumbnailImage the transparent sections will be changed to black. If I alter 
the background color, I can change that to another color, but not transparent.

What is the expected output? What do you see instead?

It would be ideal if transparency could be preserved. However, this would 
require a different PixelFormat be used than the hardcoded value in the library 
(Format24bppRgb).

What version of the product are you using? On what operating system?

1.2.4

Please provide any additional information below.

I have had success by adding a PixelFormat property that can be set by a 
constructor. Then I use that PixelFormat for the creation of the Thumbnail. 
However, the issue I run into is that if I set the PixelFormat to 
Format32bppArgb or Format32bppPrgb the transparency is preserved, but the 
Gaussian or Unsharpmask filters no longer work (they create blank images).

Attached is the KalikoImage.cs library that allows the user to set the 
PixelFormat. I would be very grateful if there were a way to get the filters to 
perform with the Format32bppArgb pixelformat.

Original issue reported on code.google.com by [email protected] on 9 Aug 2011 at 5:55

Attachments:

@GoogleCodeExporter
Copy link
Author

Thanks for your input! Next major update will include better PixelFormat 
support, also for the filters.

Original comment by [email protected] on 5 Sep 2011 at 7:58

  • Changed state: Started

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

No branches or pull requests

1 participant