Answer the question
In order to leave comments, you need to log in
How to implement the doubling effect?
$image1 = new \Imagick('image8.png');
$opacity = new \Imagick();
$opacity->newPseudoImage($image1->getImageWidth(), $image1->getImageHeight(), "gradient:");
$opacity->setImageFormat('png');
$opacity->rotateimage('black', 90);
$image2 = clone $image1;
$image2->compositeImage($opacity, \Imagick::COMPOSITE_COPYOPACITY, 0, 0);
$image1->compositeImage($image2, \Imagick::COMPOSITE_ATOP, 100, -50);
$image3 = clone $image2;
$image3->compositeImage($opacity, \Imagick::COMPOSITE_COPYOPACITY, 0, 0);
$image1->compositeImage($image3, \Imagick::COMPOSITE_ATOP, 200, -100);
header('Content-type: image/png');
echo $image1;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question