1. Home
  2. Computing & Technology
  3. Linux

GNU/Linux Command-Line Tools Summary

From


   GNU/Linux Command-Line Tools Summary
   Prev        Next

Chapter 16. Graphics tools (command line based)

The graphics tools chapter explains some image programs that can be called from the command-line. While I have found image programs that can be used from the command-line, zgv is the only one I've ever heard of, I did not find them very useful. All the tools listed use the X windowing system to work and simply run from the command line (so they can be scripted/automated if necessary).

  • 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.


           Note
            

    Note that the images are converted to the same size (scaled) so they can be tiled together.


  • 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


  • 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


  • 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.


           Speed Warning
            

    Be careful when opening multiple large sized images (especially on a slow machine) and putting the slide show on a small delay between image changes. Your processor will be overloaded and it will take a significant amount of time to be able to close ImageMagick.


  • 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


  • 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:ImageMagick


       [blockquote

[/blockquote]

* License

* GNU/Linux Command-Line Tools Summary Index

Explore Linux
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Linux
  4. Linux Documentation
  5. Linux Tools Summary
  6. GNU/Linux Command-Line Tools Summary - Graphics tools (command line based)

©2009 About.com, a part of The New York Times Company.

All rights reserved.