Rubblewebs

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.

Compose options

Src-atop

More information to follow.

Src-atop example
$cmd = "$input9 $input8 -gravity northwest -compose src-atop -matte"; 
exec("composite $cmd src-atop.gif");

Src-in

More information to follow.

Src-in example
$cmd = "$input9 $input8 -gravity northwest -compose src-in -matte"; 
exec("composite $cmd src-in.gif");

Src-out

More information to follow.

Src-out example
$cmd = "$input9 $input8 -gravity northwest -compose src-out -matte"; 
exec("composite $cmd src-out.gif");

Src-over

More information to follow.

Src-over example
$cmd = "$input9 $input8 -gravity northwest -compose src-over -matte"; 
exec("composite $cmd src-over.gif");

Subtract

Subtract one image from the other

Subtract example
$cmd = " $input annotate.jpg -gravity center -compose subtract -matte"; 
exec("composite $cmd subtract.jpg");

Vivid-light

More information to follow.

Vivid-light example
$cmd = " $input $input -gravity center -compose vivid-light -matte"; 
exec("composite $cmd vivid-light.jpg");

Xor

More information to follow.

Xor example
$cmd = "$input9 $input8 -gravity northwest -compose xor -matte"; 
exec("composite $cmd xor.gif");