Support for transparent background in .png format image

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

Moderator: Alex

Post Reply
emlarsen
Posts: 1
Joined: Wed Feb 25, 2015 8:18 pm

Support for transparent background in .png format image

Post by emlarsen »

Does VintaSoft Imaging support png files with transparent backgrounds? I have an older version and it load the file just fine but after a resize the background is black. Do I need to handle this in code or do I need a newer version?
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Support for transparent background in .png format image

Post by Alex »

Hello Mark,

Yes, current version supports transparency in PNG images.

Please download the evaluation version of SDK from our web site:
http://www.vintasoft.com/zip/VSImagingNet81.zip

evaluate it, make sure it suits your needs and only then renew subscription for your license.

Best regards, Alexander
DuempertM
Posts: 4
Joined: Tue Jun 02, 2015 3:14 pm

Re: Support for transparent background in .png format image

Post by DuempertM »

Hello,

We have a little problem with a PNG File.
This File have a tranparency background and when i save it to a JPG File is the background black.

How can I determine the transparency in C # and save the tranparent color to a JPG File.

I hope you can help me with an example

Greetings
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Support for transparent background in .png format image

Post by Alex »

Hello,

JPEG image does not store information about transparency because JPEG file can store only 24-bpp RGB image or 8-bpp grayscale image.

Best regards, Alexander
DuempertM
Posts: 4
Joined: Tue Jun 02, 2015 3:14 pm

Re: Support for transparent background in .png format image

Post by DuempertM »

That is clear.

Let's take a PNG file with a transparency. The color is white.
I am looking for a way to save this file as a JPG file with a white background.

Is that possible ? And if so how?

If I open the file for example with IrfanView and save as JPG, the background is also white and not black.
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Support for transparent background in .png format image

Post by Alex »

Irfan replaces the transparent color to the white color before image saving. And I think Irfan uses white color because white color is specified as the background color in Irfan settings.

For solving your task you need to do the following steps:
Best regards, Alexander
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Support for transparent background in .png format image

Post by Alex »

Also for solving your task you can create a temporary empty image, fill temporary image with white color, draw PNG image on temporary image and save temporary image in JPEG file.

Best regards, Alexander
Post Reply