Replacing Background Color on PNG to Transparent

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
tplambeck
Posts: 15
Joined: Wed May 08, 2019 7:09 pm

Replacing Background Color on PNG to Transparent

Post by tplambeck »

I am receiving PNG image files into my system and I need to change the background color to transparent. I run the ReplaceColorCommand but the background is unchanged. I checked the image with the HasCertainColorCommand and the image does not have the transparent color so I assume this is the issue? Is there a way to add the transparent color so I can use it to replace the existing background color or another solution?

Thanks
tplambeck
Posts: 15
Joined: Wed May 08, 2019 7:09 pm

Re: Replacing Background Color on PNG to Transparent

Post by tplambeck »

I was able to resolve the issue by saving the image with the PngEncoder and reloading it. After that, I was able to make the background transparent.
Alex
Site Admin
Posts: 2044
Joined: Thu Jul 10, 2008 2:21 pm

Re: Replacing Background Color on PNG to Transparent

Post by Alex »

Hello,

PNG file can contain 32-bit color image with transparency. Let me know if you will have any question or problem.

Best regards, Alexander
Post Reply