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.
Interpret string and print to console.
convert rose: -format "%wx%h\n" -write info: x.png convert rose: -print "%wx%h\n" x.png Output=70x46
Specify the output image quality.
$cmd = "$input -quality 10"; exec("convert $cmd quality.jpg");
( Only works for jpg, miff and png images 100 = least compression so best quality. )
Suppress all warning messages.
More information to follow.( Error messages are still reported. )
Blur around the center of the image.
$cmd = "$input -radial-blur 10"; exec("convert $cmd radial_blur.jpg");
Lighten or darken image edges.
$cmd = "$input +raise 10"; exec("convert $cmd raise_down.jpg");