Running the Image Viewer
To run the ImageManip2D application, type "java app.ImageManip2D" on the command line. When the application frame comes up, select Load | List Select to launch the MultiImageLoader bean. When this bean is launched, you can either enter the desired directory or click on the Browse option. Once you have selected an image, click on Load Image to display it.
To pan and zoom the displayed image, right-click on the viewport to launch a pop-up menu with three items: Pan, Zoom in, and Zoom out (see Figure 7.10). If you select Pan, drag the mouse to pan the image. If you select Zoom in or Zoom out, position the cursor at a desired position and click. If Zoom in is selected, the displayed image will be magnified with the position of the mouse as the center of the image. Likewise, Zoom out will shrink the displayed image whenever you click on the image.
To rotate and shear the image, select the Manipulate menu, which has three menu items: Flip, Rotate/Shear, and Lens (see Figure 7.15). If you select Lens, the image viewer application will launch a Lens panel as shown in Figure 7.12. Note that the lens feature resets all manipulations. To use the lens feature, drag the mouse over the image. You can change the size of the lens with the options in the Lens panel.
If you select Rotate/Shear, the panel shown in Figure 7.14 will be launched. To rotate the image, select the Rotate tab and adjust the slider. You can see the image rotating at its midpoint. Likewise, to shear the image, adjust the Shear slider.
The Flip menu item has three subitems: Left to Right, Top to Bottom, and Top to Bottom and left to right (see Figure 7.15). Select any one of these options to flip the image in the desired direction.
To reset manipulation, select View | Display Mode and click on the desired display mode. This action will move the image to the default position with the selected display mode.