|
This tutorial offers image editing from the command prompt.
ImageMagick (IM) is a command-line graphics creation and editing application. In a previous article we used it to add text and frames to images, and for other basic image manipulation. In this article we'll use the ImageMagick suite of commands to create a multi-image mosaic, draw some basic shapes, and create 3D logos.
Superimposing images
Pasting one image over another is known as superimposing. Using this technique we can turn the hard-corners of an image into rounded borders -- or any other shape, for that matter -- by simply superimposing pre-fabricated transparent curved corners onto the image. To place them at the appropriate position we use the composite command with the -gravity switch specifying the position:
$ composite -gravity SouthEast curve_se.png image.png curved-se.png
This command superimposes the curved southeast corner onto the southeast corner of the original image. We can then use the resulting image as the source image for the next command, to apply the next corner, and so on. To curve the rest of the corners of the image:
$ composite -gravity NorthEast curve_ne.png curved-se.png curved-ne.png
$ composite -gravity NorthWest curve_nw.png curved-ne.png curved-nw.png
$ composite -gravity SouthWest curve_sw.png curved-nw.png curved-sw-final.png
The -gravity switch offers some more positions that can be used to place images. Full tutorial
|