THESE CODES ARE PROVIDED FOR AN EXAMPLE OF HOW TO USE IMAGEMAGICK WITH PHP. CARE SHOULD BE TAKEN WHEN ACCEPTING USER INPUT.
I TAKE NO RESPONSABILTY FOR ANY PROBLEMS THAT MAY OCCURE WHEN USING ANY OF THIS CODE.
IT IS UP TO YOU TO SECURE THE CODE AND VALIDATE USER INPUT.
More information to follow.
$cmd = "$input9 $input8 -gravity northwest -compose src-atop -matte"; exec("composite $cmd src-atop.gif");
More information to follow.
$cmd = "$input9 $input8 -gravity northwest -compose src-in -matte"; exec("composite $cmd src-in.gif");
More information to follow.
$cmd = "$input9 $input8 -gravity northwest -compose src-out -matte"; exec("composite $cmd src-out.gif");
More information to follow.
$cmd = "$input9 $input8 -gravity northwest -compose src-over -matte"; exec("composite $cmd src-over.gif");
Subtract one image from the other
$cmd = " $input annotate.jpg -gravity center -compose subtract -matte"; exec("composite $cmd subtract.jpg");
More information to follow.
$cmd = " $input $input -gravity center -compose vivid-light -matte"; exec("composite $cmd vivid-light.jpg");
More information to follow.
$cmd = "$input9 $input8 -gravity northwest -compose xor -matte"; exec("composite $cmd xor.gif");