One image is the background, the second one is a PNG with transparency. I'm using transformation matrix to position this image on the picture based on some operations that were calculated beforehand. I'm new to imagick, but I've done some researches and haven't found a solution yet.
Up to now, I was able to draw my image on the background with correct transparency with
Code: Select all
$background->compositeImage($image, imagick::COMPOSITE_ATOP, 0, 0);
I've tried to do the following, but didn't get any result:
Code: Select all
$draw = new ImagickDraw();
$draw->affine($affineRotate);
$draw->push();
$image->affineTransformImage($draw);
$draw->pop();
$background->drawImage($draw);
that I wasn't the only one not getting results.
I tried to modify code from here: http://phpimagick.com/ImagickDraw/affine
in order to replace the Blue rectangles by my picture, but couldn't figure a way to do so.
Thanks for pointing me to the right direction.