Support for transparent background in .png format image
Moderator: Alex
Support for transparent background in .png format image
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
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
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
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
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
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
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
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.
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
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
For solving your task you need to do the following steps:
- Check that PNG image has the transparent color. This can be done using the Vintasoft.Imaging.ImageProcessing.Info.HasCertainColorCommand class: https://www.vintasoft.com/docs/vsimagin ... mmand.html
- Replace the transparent color to the necessary color (for example, white color) in PNG image. This can be done using the Vintasoft.Imaging.ImageProcessing.Color.ReplaceColorCommand class: https://www.vintasoft.com/docs/vsimagin ... mmand.html
- Save processed PNG image to a JPEG file.
Best regards, Alexander
Re: Support for transparent background in .png format image
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
Best regards, Alexander