Skip to content
Advertisement

PHP 8 – merge transparent image over another one

I have two images:

$imageBG is the image which needs to be as background

$stamp is an image with the same dimensions and has text on it, the background of it is completely transparent.

I tried:

JavaScript

It results in only $stamp being visible without the background $imageBG

then I tried:

JavaScript

now only $imageBG is visible

I also tried couple other “solutions”

Maybe they are just outdated for PHP 8?

Advertisement

Answer

That’s how to do this:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement