Answer the question
In order to leave comments, you need to log in
PHP+GD: How to do multiply blending when overlaying images?
There are two pictures: a gray base and a logo with a white background.
The task is to overlay the logo on top of the gray base so that they merge. In the graphics editor, everything seems to be simple: two layers, where Blending mode: multiply is set for the top one with the logo and everything is ready:
How to do this in PHP using the GD library?
The only thing I dug into myself is the option of overlaying a semi-transparent top image on top of the base:
$image_1 = imagecreatefrompng('base.png');
imagealphablending($image_1, true);
imagesavealpha($image_1, true);
imagecopymerge($image_1, $iage_2, 0, 0, 0, 0, 100, 100, 50);
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