I am having trouble with compositeImage. I just want to compose two images (put a company logo onto a phone case) and what I am getting is a 16x16 white border square. I've followed this documentation. Here is my code:
$imagick1 = new Imagick(__DIR__ . '/release/images/'.$theme_param.'_'.$case_param.'_'.$phone_param.'.jpg');
$imagick2 = new Imagick(__DIR__ . '/release/images/cariocamobile_'.$logo_param.'.png');
$imagick1->compositeImage($imagick2, Imagick::COMPOSITE_DEFAULT, 0, 0);
$imagick1->setImageFormat('png');
$imagick1->setImageFormat("png");
header("Content-Type: image/png");
echo $imagick1->getImageBlob();
Also, I want to use Imagick::ATOP instead
of Imagick::COMPOSITE_DEFAULT
. How can I use it?