LinuxLinks.com
Newbies What Next ? News Forums Calendar

Search





News Sections
Home
General News (3972/0)
Reviews (626/0)
Press Releases (464/0)
Distributions (187/0)
Software (807/0)
Hardware (522/0)
Security (192/0)
Tutorials (337/0)
Off Topic (180/0)


User Functions
Username:

Password:

Don't have an account yet? Sign up as a New User


Events
There are no upcoming events



Advanced image editing from the command line with ImageMagick   
Friday, May 06 2005 @ 03:09 AM EDT
Contributed by: glosser

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

  [ Views: 1769 ]  


Advanced image editing from the command line with ImageMagick | 0 comments | Create New Account
The following comments are owned by whoever posted them. This site is not responsible for what they say.
No user comments.


What's Related
  • Full tutorial
  • More by glosser
  • More from Tutorials


  • Story Options
  • Mail Story to a Friend
  • Printable Story Format


  • We have written a range of guides highlighting excellent free books for popular programming languages. Check out the following guides: C, C++, C#, Java, JavaScript, CoffeeScript, HTML, Python, Ruby, Perl, Haskell, PHP, Lisp, R, Prolog, Scala, Scheme, and SQL.

    Built with GeekLog and phpBB
    Comments to the webmaster are welcome
    Copyright 2009 LinuxLinks.com - All rights reserved