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

Lighten

More information to follow.

Lighten example
$cmd = " $input $input -gravity center -compose lighten -matte"; 
exec("composite $cmd lighten.jpg");

Linear-dodge

More information to follow.

Linear-dodge example
$cmd = " $input $input -gravity center -compose linear-dodge -matte"; 
exec("composite $cmd linear-dodge.jpg");

Linear-light

More information to follow.

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

Minus

Subtract one image from the other

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

Multiply

More information to follow.

Multiply example
$cmd = " $input $input -gravity center -compose multiply -matte"; 
exec("composite $cmd multiply.jpg");

Order example 1

Effect of a large background jpg and Small foreground jpg

Order example 1 example
$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. )

Order example 2

Effect of a small background jpg and large foreground jpg

Order example 2 example
$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. )

Over

To follow

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

Pegtop-light

More information to follow.

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

Pin-light

More information to follow.

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

Plus

More information to follow.

Plus example
$cmd = " $input $input -gravity center -compose plus -matte"; 
exec("composite $cmd plus.jpg");

Screen

More information to follow.

Screen example
$cmd = " $input $input -gravity center -compose screen -matte"; 
exec("composite $cmd screen.jpg");

Soft-light

More information to follow.

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

Src

More information to follow.

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