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
$image = new Imagick('transparent.pdf'); $image->setImageType (imagick::IMGTYPE_TRUECOLOR); $image->writeImage('opaque.tif');
did for me!
(instead of the formerly imagick::IMGTYPE_TRUECOLORMATTE)