Reputation: 301
$image = new Imagick($destinationPath.'/'.$filename);
$image->roundCorners(1575,1575);
I'am uploading different images, one image background is transparent when I make corners rounded, but the other image background is black, why is that? and from what is depending this behaviour?
I've tried to do this:
$img->setBackgroundColor(new ImagickPixel('transparent'));
but the background is still black, someone knows which method can handle this?
Upvotes: 0
Views: 1444
Reputation: 1726
If the source image is a JPEG you need to set final image format to PNG because JPEG does not handle transparency.
$img->setImageFormat('png');
Upvotes: 1