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.

Target

Showing some of the circle draw options

Target example
 
$cmd = " -size 200x200 xc:black -stroke black -strokewidth 1 ".
" -fill white -draw \"circle 100,100 100,10 \" ".
" -fill black -draw \"circle 100,100 100,30 \" ".
" -fill blue -draw \"circle 100,100 100,50 \" ".
" -fill red -draw \"circle 100,100 100,70 \" ".
" -fill yellow -draw \"circle 100,100 100,90 \" ".
" -fill none -draw \"circle 100,100 100,20 \" ".
" -fill none -draw \"circle 100,100 100,60 \" ".
" -fill none -draw \"circle 100,100 100,80 \" ".
" -fill none -draw \"circle 100,100 100,95 \" ".
" -stroke white -fill none ".
" -draw \"circle 100,100 100,40 \" ";

exec("convert $cmd circle.png");

Create a canvas 200x200 with a black background, draw the coloured circles one on top of the other then draw the extra circles with a transparent fill.


Back