Page 1 of 1

Support for transparent background in .png format image

Posted: Thu Feb 26, 2015 12:30 am
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?

Re: Support for transparent background in .png format image

Posted: Thu Feb 26, 2015 10:20 am
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

Re: Support for transparent background in .png format image

Posted: Fri Jun 09, 2017 9:40 am
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

Re: Support for transparent background in .png format image

Posted: Fri Jun 09, 2017 10:11 am
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

Re: Support for transparent background in .png format image

Posted: Fri Jun 09, 2017 10:31 am
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.

Re: Support for transparent background in .png format image

Posted: Fri Jun 09, 2017 2:27 pm
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

Re: Support for transparent background in .png format image

Posted: Fri Jun 09, 2017 4:25 pm
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