when i upload transparent png - its uploaded jpeg with black background
can i set this background color? thanks
Hi, yes you can with something like:
$image = getUploadedImage();
$background = new Imagine\Image\Color('#fff');
$topLeft = new Imagine\Image\Point(0, 0);
$canvas = $imagine->create($image->getSize(), $background);
Pick your reaction
Closing this one as it seems already solved
Shouldn't the default background be white when converting from transparent png to jpg? How can I tell if the uploaded png has a transparent background so that I only set the canvas as described above in those cases for converting to jpg?
There is a suggested way here: http://stackoverflow.com/a/8750947
Or should I just do the above pasting on a white canvas for all png images uploaded? Would that have a significant impact on memory used and performance?