Search code examples
javaimagemagickimagemagick-convertim4java

Draw a circle using im4java


I need to draw a circle and save it as an image in a directory. I want to draw the image using im4java. I have tried to create, but there is no IMoperation available in im4java. Any help???


Solution

  • im4java is a wrapper to execute ImageMagick commands from your java code.

    As you want to call a custom command, not implemented in im4java as a standard method, then either extend im4java functionality to call this command (it is opensource) or use Apache Commons Exec to call this custom command.

    The ImageMagick command to draw a circle is explained here:

    http://www.imagemagick.org/Usage/draw/#circles