I'm trying to replicate a Gimp overlay, but I'm having problems.
The source image has transparent pixels, it's a 32-bpp PNG.
I'm applying a Overlay of 40% of one color (or a image with this color), but the result transparent pixels are being also affected.
My command-line is:
Code: Select all
convert -alpha Extract image.png \( overlay.png -alpha set -channel A -evaluate set 40% \) -alpha On -compose overlay -composite result.png
Code: Select all
$overlay = new Imagick(realpath('overlay.png'));
$overlay->evaluateimage(Imagick::EVALUATE_DIVIDE, 2, Imagick::CHANNEL_ALPHA);
$img = new Imagick(realpath('image.png'));
$img->stripimage();
$img->compositeimage($overlay, Imagick::COMPOSITE_SCREEN, 0, 0);//, Imagick::CHANNEL_ALPHA);
$img->writeimage('result.png');
$img->destroy();

The overlay image:
(Or, it can be used an overlay image with same widrh/height with the color #c44a4a and 40% opacity in the composite)

The final (Gimp) image result that I want:

Thanks in advance!