Use apt-get to install imagemagick
$ sudo apt-get install imagemagick
List binaries in imagemagick
$ dpkg -L imagemagick | grep bin /usr/bin /usr/bin/conjure.im6 /usr/bin/composite.im6 /usr/bin/import.im6 /usr/bin/mogrify.im6 /usr/bin/identify.im6 /usr/bin/display.im6 /usr/bin/animate.im6 /usr/bin/compare.im6 /usr/bin/stream.im6 /usr/bin/montage.im6 /usr/bin/convert.im6
Check convert version
$ convert --version Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC Features: OpenMP
Create circle and rectangle using imagemagick
Run to following code to create a test image having circle and rectangle.
$ convert -size 200x120 xc:lightgray -fill green -stroke black -draw "circle 100,60 80,20" -draw "rectangle 50,30 150,90" image-magick-circle-rectangle.gif