In Photoshop I've 2 images. The bottom layer contains images 1. The second layer consists of the image 2 and the blend 'Luminosity' with an opacity of 55%. The third layer consist of image 2 again, but this time with the blend 'Color'.
Thus Layers:
[image 2 - color]
[image 2 - luminosity 55%]
[image 1]
Let me know if this is not clear.
So far I only got a composition of the two images with an opacity and a colorize. This gives a result similar to what I've in Photoshop, however this is not sufficient and I would like to duplicate my Photoshop as good as possible.
Code: Select all
$image1 = new Imagick('image1.png');
$image2 = new Imagick('image2.png');
$image1->modulateImage(100 , 0 ,100);
/*
* opacity
*/
//$image2->setImageOpacity(0.5); //Doesn't work for some reason
$opacity = new Imagick();
$opacity->newPseudoImage(
$image1->getImageHeight(),
$image1->getImageWidth(),
"canvas:gray(75%)"
);
$image2->compositeImage($opacity, Imagick::COMPOSITE_COPYOPACITY, 0, 0);
$image1->compositeImage($image2, Imagick::COMPOSITE_ATOP, 0, 0);
/*
* colorize
*/
$image2 = new Imagick('wallframe.png');
$image1->compositeImage($image2, Imagick::COMPOSITE_COLORIZE, 0, 0);
$image1->writeImage ("result.png");