iOS: Adding black background on PNG
Situation:
I use the plugin, to chose a png file form my camera roll. and display it in an <img> tag using the FILE_URI
Expected Behaviour: The transparent background on the png image gets replaced with a white background.
Actual Behaviour: The transparent background on the png image gets replaced with a BLACK background.
Does this happen to all transparent pngs or only a special one?
Why the expected white background? Is the <img> on a white background?
Can you download and inspect the resulting file and look if the transparency is gone and replaced with black?
This happens to all pngs with transparent backgrounds. I expected a white background I guess because it's most common? I think most people would expect a white background instead of a black when converting a png to any jpg or the sorts. The <img> is in a div that has a white background (is this what you mean?). And yes, after inspecting and downloading the image, it has black instead of transparent or white.
@janpio have you come across any solutions?
No, my guess (without actually looking at the code) is that this is the default behavior of whatever code is used to read the png and convert it to the end result image - you should probably have a look at the code yourself.
I am also not 100% sure it would be a general expectation that this is converted into image on white, so I am not sure if this should be changed.
Same here, not resolved?