Chapter 4. ImgView

This chapter contains these sections:

To open ImgView, double-click the imgview icon on the MediaTools page of the Icon Catalog. You can also type imgview in a shell window.

About ImgView

ImgView lets you open one or more images and view them in the imgview window. You can arrange multiple images in the window and save the arrangement to one of several file formats. It also lets you see a detailed (zoomed) view of an image and edit the colormap used to display an image.

The ImgView window contains two menus and a help menu:

File 

Allows you to open, save, or remove an image, and quit the ImgView tool.

View 

Allows you to arrange and change the size of views. You can also start the Detail View and Lookup Table editor from the View menu.

The balance of the ImgView window is the image area. ImgView is shown in Figure 4-1.

Figure 4-1. The ImgView window


Viewing Images

ImgView can display as many images in its main window as you like. Each image is displayed in a view. A view is a movable window on the image, it can be arbitrarily sized and positioned on the overall image being displayed as shown in Figure 4-2.

Figure 4-2. View of an image


You can crop an image by resizing the view and saving the view of the image rather than saving the whole image. You can also compose multiple images by arranging the views and then saving the whole window. See “Arranging Views.”

These sections describe how to use ImgView:

Opening an Image

To open an image:

  1. Select “Open...” from the File menu.

    You can navigate through directories using the Up button or by clicking on a subdirectory in the scrolling list.

  2. Select the file you want to open from the file browser.

  3. Click Accept.

Saving an Image

To save an image:

  1. Click on the image you want to save with the left mouse button. It will be outlined in red.

  2. Select “Save...” from the File menu.

  3. Type in the name of the image file you want to create in the “File name” field.

  4. Select the save area and file format option by clicking the appropriate buttons.

  5. Click the Accept button.

Click Cancel to dismiss the file browser without saving your file.

Choosing a File Format

The ImageVision tools can save images in TIFF, SGI, and FIT formats. The tools can read files stored in TIFF, FIT, SGI, GIF, and PhotoCD formats.

The TIFF format is the most common and useful file format. The SGI format is used by applications on Silicon Graphics systems, including IRIS Showcase. The FIT format is not a standard, but is supported by the ImageVision Library (IL).

Removing an Image

To remove an image from the set of viewed images:

  1. With the left mouse button, select the image you want to remove.

    The image is outlined in red. You can select additional images by holding the shift key while clicking the left mouse button over these images. Each additional view is also outlined in red.

  2. Select “Remove” from the View menu. You can also use the Delete key.

  3. The image is removed from the list of viewed images; they are not deleted from the file system.

Arranging Views

When multiple images are displayed they are stacked as individual views. Views higher in the stack obscure those lower in the stack, as shown in Figure 4-3.

Figure 4-3. Arranging images in a window.


These sections describe how to use ImgView to rearrange views:

Figure 4-4 describes how to use the mouse to resize, wipe, move, and roam through views. Each of the words in the table is linked to a section that describes the mouse function.

Figure 4-4. ImgView mouse functions.


The View menu contains the following commands:

RGB mode 

Picks 24 bit or color index mode.

Double buffer 

Turns on double-buffering.

Auto scale modeSets the auto scale mode before opening an image. In auto scale mode, the image is automatically scaled to the 0-255 range of the frame buffer. 

Select All 

Selects all of the views in the window.

Detail 

Provides information on the selected view.

Look-up 

Provides a way to color balance.

Info 

Give information on a selected image.

Center 

Places the center of the image in the center of the window. Can also be invoked with the Home key.

Split 

Arranges all of the images in the view side by side with each image centered in its view. Two images are arranged in as square a grid as possible. Can also be invoked using Ctrl-t.

Abut 

Places images in the same position in the window. This is useful when comparing different images of the same area and size. Can also be invoked using Ctrl-b.

Raise 

Moves the image up in the stack of images. You can also use the up arrow key to raise the image in a stack.

Lower 

Moves the image to the bottom of the stack. You can also use the down arrow key to lower the image in a stack.

Remove 

Deletes an image.

Auto scale 

Lets you autoscale a selected image. The image is automatically scaled to the 0-255 range of the frame buffer.

Selecting Views

Select the view you want with the mouse or use the “Select All” command in the View menu to select all. Selected views are outlined in red. Select additional views by holding the shift key and clicking the left mouse button on those views. Each additional view is also outlined in red. You can also select all the views with the Ctrl-a keys.

Wiping Edges

To wipe or adjust the edge or corner of a selected view, move the mouse near the edge of the view to be adjusted. When the pointer changes shape to indicate it is near the edge, click and hold down the left mouse button. As you drag the mouse the edge or corner follows until you hit the edge of the image or release the mouse button.

To wipe the boundary between selected adjacent views, position the mouse at the boundary between the views. Hold down the Alt key and click and hold down the left mouse button. As you drag the mouse the corners follow until you hit the edge of an image or release the mouse button.

Resizing Views

To resize or adjust the opposite edges of a selected view, move the mouse near the edge or corner of the view to be adjusted. Hold down the Ctrl key and click and drag the mouse. The edge or corner chosen follows the mouse until you hit the edge of the image or release the mouse button. The opposite edge or corner moves in the opposite direction, effectively resizing the view without shifting the position of the image in the window.

Moving a View

To move a selected view, move the mouse over the view but away from the edge so that the crossed arrow cursor appears. Click and hold down the left mouse button. Drag the mouse to reposition the view.

Roaming an Image

Click and hold down the middle mouse in a view to roam the image. You can also roam through a view by positioning the mouse away from the view edge and dragging the mouse while depressing the left mouse button and holding down the Alt key. This pans the view across the image without changing the images's position on the screen.

Auto-Roam, Auto-Move, and Pan

Holding down the Ctrl key during a move or roam causes the view or image to move automatically in the direction of the mouse relative to the starting position.

Detail View

The Detail option under the View menu pops up a detailed (zoomed) view of an image as shown in Figure 4-5.

Figure 4-5. Detail view


The information in this view tracks the mouse position in the main window. When you are finished, click the Done button.

Look-up Table

The “Lookup...” command in the View menu launches a look-up table editor for the currently selected view. Before choosing this item, select a view with the left mouse button.

This editor lets you define a piecewise linear mapping of intensity values in the selected image. The initial state is a linear ramp for all colors. Use the buttons to control the editing of a ramp for all colors or for one of the red, green, or blue color components. When you are editing all colors the ramp is shown in black, when you are editing one color, all three ramps are shown in red, green, and blue, with the currently active ramp on top. Reset the active ramp to the original linear ramp with the Set to linear button.

The ramp is composed of a series of straight segments drawn between breakpoints. The breakpoints appear as crosses. The horizontal axis represents the intensity levels of the original image. The vertical axis represents the intensity level that original level will be mapped to. To manipulate the ramp, move, insert, or delete the breakpoints with the mouse.

Moving a Point

To move a point, place the mouse near one of the breakpoints and press and hold down the left mouse button. Drag the mouse cursor to the nearest point to any valid location on the graph; ImgView prevents you from making an ill-defined mapping that maps an input value to multiple output values.

Inserting a Point

To insert a point, place the cursor near one of the linear segments and press and hold the middle mouse button. A point is inserted on the nearest segment. Holding down the mouse button, drag the point to any valid location on the graph.

Deleting a Point

To delete a point, place the mouse cursor near one of the breakpoints and click the right mouse button. The nearest point is deleted.

Dragging a Point

While you are dragging a point the caption below the graph shows the corresponding input value and the value it will be mapped to. On faster systems the displayed image is updated continuously as you drag a point. Slower systems update the image when you release the mouse button.

Customizing

ImgView has two customization options you can set using X resources from your .Xdefaults file.

imgview* geometry 


Determines the position and size of the ImgView window when ImgView starts up. You must supply a standard X geometry specification.

imgview* noBorder: True/False 


Determines whether or not ImgView starts out with window decorations. If set to false, ImgView uses a pop-up menu in place of the standard menu bar. The default is to have window decorations and a pull-down menu.