
The ECN No Name Newsletter is no longer being published. This is an archived issue.
[previous article] [next article]Suzy Pelouch
Wish you could use pictures in your hypertext files? Or print out amazing pictures you've seen on the Web? Or simply display your favorite image in the background of your screen? Using xv, all of this and much more is possible.
"xv" is an interactive image display used in X Windows. Using xv, you can not only copy the image you want, but you can also personalize it by altering the colors, orientation, or sizing to your liking.
To start xv, simply type xv in any xterm window. This will produce the xv logo window. Click anywhere in this window with the right mouse button to bring up the controls window.
From here, click with the left button on the grab button. After placing your pointer in the image you want to work with, click again with the left button. To choose the sections you want, place your pointer (which is now crosshairs) on one corner of the section and click and drag with the center mouse button until you are satisfied with your cropping rectangle. To redraw the rectangle, click again with the center mouse button, and try again. Once you are finished, select the crop button (with the left mouse button) in the xv control window. This will put only the selected section in a separate window.
If the image seems to have been distorted during cropping, clicking on the aspect button will fix the problem. The smooth button tries to make the image look as similar to the original as possible. With larger images this sometimes is a very slow process. Smoothing can be reversed by clicking the raw button.
Sizing or rotating the image is another way to personalize it. The collection of buttons on the lower right will rotate, bring the image closer or farther away diagonally, or change the size. The maxpect option makes the image as large as your screen allows, without distorting the image. The max button on the other hand, merely enlarges the image, sometimes resulting in a distorted picture.
The options for color are limited only by what your monitor can handle. By clicking on the ColEdit button, the color editor is activated. The colors can be brightened (brite), dimmed (dull), or completely removed (grey). The collection of dials and graphs allow you to custom blend colors for the picture. The norm button returns the image to its original colors and intensity.
To create a usable file, select the save button in the xv window. Type the name in the box, or choose an already existing file from the menu. Then choose the format and colors you want the file saved in. If you want to print your image, a PostScript file works best. Otherwise GIF is the common choice. Next simply click on Ok, and your file will be added to your directory.
"xv" can also be used to create "hot-spots" in clickable image-maps for various web browsers. To make these, you need the specific coordinates of the area you want to use. These coordinates can be viewed through xv by positioning the pointer anywhere within the selected image and holding down the left mouse button. The coordinates appear in a black box in the upper left corner of the xv window. These coordinates will change if you scoll around the image while holding down the button.
To add an image into a hypertext document using HTML, locate the place you want the image to appear and type:
< IMG SRC="filename.gif">
The image will then be displayed in your document at the proper point.
Many pictures, on the Web or otherwise, are copyrighted or in some other way have restrictions on their use. Make sure to check for any restrictions before using/distributing anything you have copied. Often this involves contacting the holder of the rights and asking for permission. But its better to be safe than sorry!
For more detailed information on xv, type man xv on any SunOS terminal.