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.
Implode image pixels about the center.
$cmd = "$input -implode 2 "; exec("convert $cmd implode.jpg");
( Implode greater than 1 is over-kill and implode with a negative number is an 'explode' )
Method to generate intensity value from pixel.
Use this type of rendering intent when managing the image color.
More information to follow.$cmd = "$input -intent relative -black-point-compensation". " -profile CMYK_PROFILE "; exec("convert $cmd intent.jpg");
The space between two text lines.
$cmd = "-size 213x160 -background NavajoWhite -fill black". " -gravity center -interline-spacing 10 -pointsize 30". " caption:\"Caption with interline spacing\" "; exec("convert $cmd interline-spacing.jpg");
Set the pixel color interpolation method to use when looking up a color based on a floating point or real value.
More information to follow.The space between words.
$cmd = "-size 213x160 -background NavajoWhite -fill black". " -gravity center -interword-spacing 30 -pointsize 30". " caption:\"Caption with interword spacing\" "; exec("convert $cmd interword-spacing.jpg");
The space between letters.
$cmd = "-size 213x160 -background NavajoWhite -fill black". " -gravity center -pointsize 30 -kerning 15 caption:\"Kerning\" "; exec("convert $cmd kerning.jpg");
Not displayed but added to the image.
$cmd = "$input -label \"Hibiscus\" "; exec("convert $cmd label.jpg");
Perform local adaptive threshold.
$cmd = "$input -lat 50x50+100+50"; exec("convert $cmd lat.jpg");
Adjust the level of image channels.
$cmd = "$input -level 5%,95%,0.8"; exec("convert $cmd level.jpg");