I have a png image with a transparent background and I want to convert it to a jpg image with a white background.
The code is basically this:
$image
Try the following, it works for me:
$im = new Imagick('trans.png'); $im->setimagebackgroundcolor('white'); $im = $im->flattenimages(); $im->writeimage('transToWhite.jpg');
Hope that helps!