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 lighten -matte"; exec("composite $cmd lighten.jpg");
More information to follow.
$cmd = " $input $input -gravity center -compose linear-dodge -matte"; exec("composite $cmd linear-dodge.jpg");
More information to follow.
$cmd = " $input $input -gravity center -compose linear-light -matte"; exec("composite $cmd linear-light.jpg");
Subtract one image from the other
$cmd = " annotate.jpg $input -gravity center -compose minus -matte"; exec("composite $cmd minus.jpg");
More information to follow.
$cmd = " $input $input -gravity center -compose multiply -matte"; exec("composite $cmd multiply.jpg");
Effect of a large background jpg and Small foreground jpg
$cmd = "$input small.jpg -gravity center -compose screen -matte"; exec("composite $cmd example1.jpg");
( Compose images using screen and a Large background jpg and Small foreground jpg. This is to show the way the image size will change depending on which image is called first. )
Effect of a small background jpg and large foreground jpg
$cmd = "small.jpg $input -gravity center -compose screen -matte"; exec("composite $cmd example2.jpg");
( Compose images using screen and a small background jpg and large foreground jpg. This is to show the way the image size will change depending on which image is called first. )
To follow
$cmd = "$input9 $input8 -gravity northwest -compose over -matte"; exec("composite $cmd over.gif");
More information to follow.
$cmd = " $input $input -gravity center -compose pegtop-light -matte"; exec("composite $cmd pegtop-light.jpg");
More information to follow.
$cmd = " $input $input -gravity center -compose pin-light -matte"; exec("composite $cmd pin-light.jpg");
More information to follow.
$cmd = " $input $input -gravity center -compose plus -matte"; exec("composite $cmd plus.jpg");
More information to follow.
$cmd = " $input $input -gravity center -compose screen -matte"; exec("composite $cmd screen.jpg");
More information to follow.
$cmd = " $input $input -gravity center -compose soft-light -matte"; exec("composite $cmd soft-light.jpg");
More information to follow.
$cmd = "$input9 $input8 -gravity northwest -compose src -matte"; exec("composite $cmd src.gif");