-->

Previous | Table of Contents | Next

Page 252

You'll really like ImageMagick's display command, which has more than 75 different features and effects you can use to edit or change graphic images. One interesting feature is the ability to load images into a visual directory so you can see thumbnails of all images in a directory. Using the display command is easy, but you must be running the X Window System. From a terminal command line, type the following:


# display &

This starts the program. To see a visual directory of your graphics, type the following:


# display `vid:*.gif' &

This command line loads all .gif graphics in the current directory. Once the program starts, access its menus by pressing the left mouse button when your cursor is over the images window. The display command imports and exports 58 different graphics formats. The program features built-in help, and also can create slide shows of graphics (see Figure 16.2).

For more information about ImageMagick, see its manual page, and the manual pages for the other programs in the distribution. Comprehensive hypertext documentation is under

Figure 16.2
The display X11 client,
included with the
ImageMagick software
package, can be used
to make changes to
many different types
of graphics.

Page 253

the /usr/doc/ImageMagick directory.

Using the xv Command to View Graphics

The xv command is a handy previewer used to review, crop, scale, edit, or convertgraphics. This command offers many sophisticated sizing and color controls, and you also canuse xv, found under the /usr/X11R6/bin directory, to capture windows of your X11 session(you must run X11 in order to use the xv command).

The xv command loads a single file or series of graphics if you specify the files on the command line:


# xv *.jpg

This command line loads all files ending in .jpg in the current directory. After the files are loaded, scroll through a list of files to make your changes, or use a graphic directory to select your files (see Figure 16.3).

The xv command can import and export 18 different graphics file formats, and also prints

Figure 16.3
The xv command is an
X11 client that loads,
edits, captures, saves,
or prints images, and
features sophisticated
color controls.

graphics. For more information about using xv, see its manual page, or read the definitive documentation (128 pages in PostScript format, nearly as many as the xv command's 107 command-line options!) found under the /usr/doc/xv directory.

Using the gv Command to View PostScript Files

Page 254

The gv command is a PostScript previewer used to examine or read PostScript graphics or documents before printing. You must run the X Window System to use this program. The gv command, found under the /usr/X11R6/bin directory, is a much-improved previewer by Johannes Plass, and is based on the previous ghostview program by Tim Theilson (you'll find a symbolic link under /usr/X11R6/bin called ghostview, which points to gv).

The gv command has more than 36 different command-line options, and uses a number of X11 Toolkit options, such as geometry settings. You can start gv by itself, or specify a file on the command line, along with its options:


# gv -geometry 640x480 myfile.ps

This command line starts the gv command in a 640 by 480 pixel window with the file myfile.ps displayed. Another great feature of the gv command is that it reads portable document format, or .pdf files (see Figure 16.4). This is a handy way to read .pdf documents without installing an additional .pdf reader, such as Adobe Acrobat.

The gv command also uses a unique scrolling mechanism; instead of scrollbars alongside

Figure 16.4
The gv X11 client
displays PostScript or
PDF documents and
graphics, and provides
an easy-to-use inter-
face to previewing files
before printing.

or below the document window, a rectangular button controls the document viewing area. You also can print whole documents or selected pages by using different commands.

You'll find a comprehensive manual page, along with a hypertext series of .html files under the /usr/doc/gv directory.

Painting and Drawing with xpaint and xfig

Page 255

If you need to create or edit simple bitmap graphics, use David Koblas' xpaint program, found under the /usr/X11R6/bin directory. For technical drawing, you'll also find the xfig program, which uses drawing objects (with handles), rather than a flat canvas.

The xpaint program features a floating control window with tools, and a separate canvas window with color palettes for selecting or mixing colors. The xpaint program has several different command-line options, and also can use a resource file, called .Xpaintrc (located in your home directory), to customize colors and patterns. You can load graphics from the command line:


# xpaint mygraphic.bmp

The xpaint program starts, presents the image in an editing window, and displays a floating window of tools (see Figure 16.5). Xpaint imports eight and exports 10 different file formats. You also may have multiple windows with different images waiting to be edited.

If you'd rather work with a drawing program, try the xfig program (see Figure 16.6).Like

Figure 16.5
The xpaint X11 client
is a simple bitmap
editing program with a
fatbits mode, multiple
windows, and image
filters.

xpaint, you must run X11 in order to use this program. You should have an X11 display of at least 1024 pixels high by 768 pixels wide in order to use this program (although you can use it with an 800-by-600 display, you'll miss some tools on the xfig window).

Starting the xfig program is easy, and you can control the initial size of its drawing area by using the -ph and -pw command-line options. For example,


# xfig -ph 6 -pw 8 &

This command line starts the xfig program with a canvas six inches high by eight inches

Previous | Table of Contents | Next