My goal is to subtract one transparent image from another (like delete watermark when I have this watermark as a picture)
I found ImageMagick script, but I don't know how to translate it to IMagick PHP code.
Can you help me with understanding this script or with translating it?
Code: Select all
convert ^
image.png ^
( image-for-delete.png ^
( +clone -alpha extract +write mpr:WEX ) ^
-compose Multiply -composite -negate ^
) ^
-gravity center ^
-compose ModulusAdd -composite ^
( mpr:WEX -negate ) ^
-alpha off ^
-compose DivideSrc -composite ^
dewm.png
Thank you!