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.
$cmd = " -size 400x300 xc:white -fill orange ".
" -draw \"circle 200,150 200,3\" -gaussian 1x1 -transparent ";
exec("convert $cmd orange mask.png");
exec("convert $input14 mask.png -composite round.jpg");
unlink( 'mask.png' );
Changing a square picture to a round one. The picture is still square but the backgound for this image is white