Linux Tips: 7 Command Line Graphic Tools

April 2, 2007 |

Editing graphics from the GUI is overrated. You can do it faster and better from the command line. Here we list 7 command line graphic tools that you may use from your Linux desktop. Because they’re command line, they can be scripted.

1) montage
Creates a ‘montage’, an image created of many other images, arranged in a random fashion.Command syntax:

montage r34.jpg r32.jpg skylines* skyline_images.miff

The above would create a “montage� of images (it would tile a certain number of images) into a composite image called “skyline_images.miff�, you could always use display to view the image.

2) convert
To convert the file format of an image to another image format. convert is used to change a files format, for example from a jpeg to a bitmap or one of many other formats. convert can also manipulate the images as well (see the man page or the ImageMagick site).Example from Jpeg to PNG format:

convert JPEG: thisfile.jpg PNG: thisfile.png

3) import
Captures screen-shots from the X server and saves them to a file. A screen-dump of what X is doing.Command syntax:

import file_name

4) display
display is used to display (output) images on the screen. Once open you are can also perform editing functions and are able to read/write images. It has various interesting options such as the ability to display images as a slide show and the ability to capture screenshots of a single window on-screen.Command syntax (for displaying an image):

display image_name

To display a slide show of images, open the images you want possibly using a wildcard, for example:

display *.jpg

And then click on the image to bring up the menu and then look under the miscellaneous menu for the slide show option.

5) identify

Will identify the type of image as well as it’s size, colour depth and various other information. Use the -verbose option to show detailed information on the particular file(s).Command syntax:

identify image_name

6) mogrify
mogrify is another ImageMagick command which is used to transform images in a number of different ways, including scaling, rotation and various other effects. This command can work on a single file or in batch.For example, to convert a large number of tiff files to jpeg files you could type:

mogrify -format jpeg *.tiff

This command has the power to do a number of things in batch including making thumbnails of sets of images.

For this you could type:

mogrify -geometry 120x120 *.jpg

7) showrgb
showrgb is used to uncompile an rgb colour-name database. The default is the one that X was built with. This database can be used to find the correct colour combination for a particular colour (well it can be used as a rough guide anyway).To list the colours from the X database, simply type:

showrgb

 



Comments

1 Comment so far

  1. Sam on April 24, 2007 6:15 am

    You must have the package imagemagick installed, otherwise the programs will not be on your system

Name

Email

Website

Speak your mind

  • Categories

  • Sponsors