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 200x200 xc:none -stroke black -strokewidth 1 -fill pink ".
" -draw \"ellipse 100,100 62,94 0,360 \" ".
" -fill red -draw \"ellipse 100,120 25,38 45,135\" ".
" -fill white -draw \"ellipse 75,75 19,28 0,360\" ".
" -draw \"ellipse 125,75 19,28 0,360\" -fill blue ".
" -draw \"ellipse 75,75 10,14 0,360\" ".
" -draw \"ellipse 125,75 10,14 0,360\" ";
exec("convert $cmd ellipse.png");
Use Ellipse to draw a partial ellipse centered at the given point with the x-axis and y-axis radius and start and end of arc in degrees. You can draw part of an ellipse and fill or not fill that part e.g. the mouth in this sketch.