I'm using the Phalcon class Imagick and I want to convert all images in .jpg. When I upload a PNG with alpha the background is black and I want this background in white. I see in the Imagick's documentation a method named "background" but this function doesn't work.

Actually I'm using this (I just change the extension in .jpg) :

       $file->moveTo($baseLocation . $filename); // $filename = image.jpg

$image_fullsize = new Imagick($baseLocation . $filename); $image_fullsize->resize(500, 500); //----- Need a conversion to JPG Here -----\ $image_fullsize->save($baseLocation . $filename);

Do you have an trick to resize and convert to jpg with a white background is the png image content an alpha ?