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 = " $input $input -gravity center -compose add -matte"; exec("composite $cmd add.jpg");
Clear the image
$cmd = "$input9 $input8 -gravity northwest -compose clear -matte"; exec("composite $cmd clear.gif");
More information to follow.
$cmd = " $input $input -gravity center -compose color-burn -matte"; exec("composite $cmd color-burn.jpg");
More information to follow.
$cmd = " $input $input -gravity center -compose color-dodge -matte"; exec("composite $cmd color-dodge.jpg");
More information to follow.
$cmd = "$input9 $input8 -gravity northwest -compose copy -matte"; exec("composite $cmd copy.gif");
More information to follow.
$cmd = " $input $input -gravity center -compose darken -matte"; exec("composite $cmd darken.jpg");
Difference between the images
$cmd = " annotate.jpg $input -gravity center -compose difference -matte"; exec("composite $cmd difference.jpg");
More information to follow.
$cmd = "$input9 $input8 -gravity northwest -compose dst -matte"; exec("composite $cmd dst.gif");
More information to follow.
$cmd = "$input9 $input8 -gravity northwest -compose dst-atop -matte"; exec("composite $cmd dst-atop.gif");
More information to follow.
$cmd = "$input9 $input8 -gravity northwest -compose dst-in -matte"; exec("composite $cmd dst-in.gif");
No image available
$cmd = "$input9 $input8 -gravity northwest -compose dst-out -matte"; exec("composite $cmd dst-out.gif");
More information to follow.
$cmd = "$input9 $input8 -gravity northwest -compose dst-over -matte"; exec("composite $cmd dst-over.gif");
More information to follow.
$cmd = " $input $input -gravity center -compose exclusion -matte"; exec("composite $cmd exclusion.jpg");
More information to follow.
$cmd = " $input $input -gravity center -compose hard-light -matte"; exec("composite $cmd hard-light.jpg");