XV: The Control Window, part 1/6

# The Control Window

The xv controls window is the central point of control for the program, which just goes to show how appropriately it was named. It contains controls to resize the current image, flip and rotate it, load and save different files, and bring up the other xv windows. It can be brought up by clicking the Right mouse button in the image window, or by pressing the ? key inside any open xv window. Doing either of these things while the xv controls window is visible will hide it.

All of the following commands may be executed by either clicking the appropriate command button, or typing the keyboard equivalent (where given) into any open xv window.

## Resizing Commands

| The resizing commands have all been moved to the Image Size menu. Note that none of the 'resizing' commands modify the image in any way. They only affect how the image is displayed. The image remains at its original size. This allows you to arbitrarily stretch and compact the image without compounding error caused by earlier resizing. In each case, the displayed image is recomputed from the original internal image. Note: The keyboard equivalents for each command are listed on the right side of the menu. These commands may be entered in the xv image window, the xv controls window, the xv info window, and the xv color editor window. They may not be entered in the xv visual schnauzer windows, the xv load window, or the xv save window. The same goes for all other commands listed in the xv controls window.

  Attempts to return the image to its normal size, where one image pixel maps to one screen pixel. For example, if the image (or the current cropped portion of the image) has a size of 320x200, this command will attempt to make the image window 320 screen pixels wide by 200 screen pixels high.

  This command may fail in two cases. If you're running a window manager (such as mwm) that enforces a minimum window size, and the 'normal' size is too small, the image may get distorted. See the note in "Cropping" for more information.

  Also, if the image is larger than the size of your screen, it will be shrunk (preserving the aspect ratio) until it fits on the screen. For example, if you try to display a 1400x900 image on a 1280x1024 screen, the Normal command will display a 1280x823 image. (1400/900 = 1280/823)

  This command will make the displayed image the same size as the screen. If you are running a window manager that puts up a title bar, you'll find that the title bar is now off the top of the screen. To get the title bar back, simply shrink the image to anything smaller than the size of the screen. The window will be moved so that the title bar is once again visible.
  Makes the image as large as possible, while preserving the aspect ratio. This avoids the generally unwanted image distortion that Max Size is capable of generating. For example, if you have a 320x200 image, and an 1280x1024 screen, doing the Maxpect command will result in an image that is 1280x800. Max Size , on the other hand, would've generated an image of size 1280x1024, which would be appear 'stretched' vertically.
  Doubles the current size of the image, with the constraint that neither axis is allowed to be larger than the screen. For example, given a 320x200 image and a 1280x1024 screen, the image can be doubled once (to 640x400), a second time (to 1280x800), but a third time would make the image 1280x1024. You'll note that on the third time, the width didn't change at all, since it was already at its maximum value. Also note that the height wasn't allowed to double (from 800 to 1600), but was truncated at its maximum value (1024).
  Halves the current size of the image, with the constraint that neither axis is allowed to have a size less than 1 pixel. Also, you may run into 'minimum size' problems with your window manager. See the note in "Cropping" for more information.

  Note that the window size is maintained as a pair of integers. As a result you may see some integer round-off problems. For example, if you halve a 265x185 image, you'll get a 132x92 image, which is just fine. However, if you Double Size this image, you'll get a 264x184 image, not the 265x185 image that you started with.

  Increases the current size of the image by 10%, subject to the constraint that the image cannot be made larger than the screen size (in either axis). For example, issuing this command on a 320x200 image will result in a 352x220 image.
  Decreases the current size of the image by 10%. Neither axis of the image is allowed to shrink below 1 pixel. Also, you run the risk of running into 'minimum window size' problems with your window manager.

  It should be noted that the 10% Larger and 10% Smaller commands have no concept of an 'original size'. They simply increase or decrease the current image size by 10%. As a result, they do not undo each other. For example, take a 320x200 image. Do a 10% Larger and the image will be 352x220. If you issue the 10% Smaller command now, the image will be made (352 - 35.2)x(220 - 22), or 316x198.

  Lets you specify the exact size, or exact expansion, to display the image. Pops open a dialog box where you can type a string of the form " width x height", " expansion%", or " horiz-expansion% x vert-expansion%". The spaces between numbers aren't necessary, but the 'x' and '%' characters are.
  Applies the 'default aspect ratio' to the image. This is done automatically when the image is first loaded. Normally, the default aspect ratio is '1:1', but certain GIF files may have an aspect ratio encoded in them. You can also set the default aspect ratio via a command-line argument or an X resource. See "Image Sizing Options" for more info. The idea behind this command is that you'd stretch the image manually (via your window manager) to roughly the size you'd like, and then use the Aspect command to fix up the proportions.

  Normally Aspect expands one axis of the image to correct the aspect ratio. If this would result in an image that is larger than the screen, the Aspect command will instead shrink one of the axes to correct the aspect ratio.

  Attempts to resize the image so that the ratio of width to height is equal to 4 to 3. (e.g., 320x240, 400x300, etc.) This is useful because many images were meant to fill the screen on whatever system they were generated, and nearly all video tubes have an aspect ratio of 4:3. This command will stretch the image so that things will probably look right on your X display (nearly all of which, thankfully, have square pixels). This command is particularly useful for images which have really bizarre sizes (such as the 600x200 images presumably meant for CGA, and the 640x350 16-color EGA images).
  Resizes the image to the nearest integral expansion or compression ratio. For example, if an image is currently being displayed at "162.43% x 231%", the IntExpnd command will show the image at a "200% x 200%" expansion ratio. Likewise, if an image is being shown at a "37% x 70%" expansion ratio, IntExpnd will resize it to "33% x 50%", the nearest integer compression ratios.

| An alternate way of issuing the 10% Larger command.

| An alternate way of issuing the 10% Smaller command.

## Rotate/Flip Commands

| Rotates the entire image (not the selection) 90 clockwise. Keyboard equivalent: t

| Rotates the entire image (not the selection) 90 counter-clockwise. Keyboard Equivalent: T

| Flips the image (or the selected area of the image) horizontally (around the vertical center-line of the image). Keyboard Equivalent: h

| Flips the image (or the selected area of the image) vertically (around the horizontal center-line of the image). Keyboard Equivalent: v