XV: Modifying xv Behavior, part 2/4

## 8/24-Bit Options

See "The 24/8 Bit Menu" for further information about the following options.

-/+8
  Locks xv into 8- bit Mode .
  (Resource name: `force8` . Type: boolean)
-/+24
  Locks xv into 24-bit Mode .
  (Resource name: `force24` . Type: boolean)

The following three options only come into play if you are using xv to display 24-bit RGB data (PPM files, color PM files, JPEG files, the output of bggen, etc.), and you have xv locked into 8-bit Mode , or you save 24-bit image data into an 8-bit graphics file format (such as GIF). They have no effect whatsoever on how GIF pictures or 8-bit greyscale images are displayed.

-quic`k24`
  Forces xv to use the 'quick' 24-bit to 8-bit conversion algorithm. This algorithm dithers the picture using a fixed set of colors that span the entire RGB colorspace. In versions of xv prior to 2.10, this was the default algorithm. It no longer is.

  (Resource name: `quick24` . Type: boolean)

-sl`ow24`
  Forces xv to use the 'slow' 24-bit to 8-bit conversion algorithm. This algorithm uses a version of Heckbert's median cut algorithm to pick the 'best' colors on a per-image basis, and dithers with those. This is the current default conversion algorithm.

  Advantages: The `-slow24` algorithm often produces better looking pictures than the `-quick24` algorithm.

  Disadvantages: The `-slow24` algorithm is about half as fast as the `-quick24` algorithm. Also, since the colors are chosen on a per-image basis, it can't be used to display multiple images simultaneously, as each image will almost certainly want a different set of 256 colors. The `-quick24` algorithm, however, uses the same exact colors for all images, so it can display many images simultaneously, without running out of colors.

  (Resource name: `slow24` . Type: boolean)

-be`st24`
  Forces xv to use the same algorithm used in the program ppmquant, written by Jef Poskanzer. This algorithm also uses a version of Heckbert's median cut algorithm, but is capable of picking 'better' colors than the `- slow24` algorithm, and it doesn't dither.

  Advantages: Generally produces slightly better images than the `-slow24` algorithm. Also, the images are undithered, so they look better when expanded.

  Disadvantages: Much slower than the `-slow24` algorithm. Like, 5 to 10 times slower. The images produced aren't that much better than those produced by the `-slow24` algorithm.

  (Resource name: `best24` . Type: boolean)

-noq`check`
  Turns off a 'quick check' that is normally made. Normally, before running any of the 24-bit to 8-bit conversion algorithms, xv determines whether the picture to be displayed has more than 256 unique colors in it. If the picture doesn't, it will treat the picture as an 8-bit colormapped image (i.e., GIF), and won't run either of the conversion algorithms.

  Advantages: The pictures will be displayed 'perfectly', whereas if they went through one of the conversion algorithms, they'd probably be dithered.

  Disadvantages: Often uses a lot of colors, which limits the ability to view multiple images at once. (See the `-slow24` option above for further info about color sharing.)

  (Resource name: `noqcheck`. Type: boolean)

## Root Window Options

xv has the ability to display images on the root window of an X display, rather than opening its own window (the default behavior). When using the root window, the program is somewhat limited, because the program cannot receive input events (keypresses and mouse clicks) from the root window. As a result, you cannot track pixel values, nor crop, nor can you use keyboard commands while the mouse is in the root window.

-/+roo`t`
  Directs xv to display images in the root window, instead of opening its own window. Exactly how the images will be displayed in the root window is determined by the setting of the `-rmode` option. Defaults to style '0' if `- rmode` is not specified.

  (Resource name: <none>)

-rm`ode` mode
  Determines how images are to be displayed on the root window, when `-root` has been specified. You can find the current list of 'modes' by using a mode value of '-1'. xv will complain, and show a list of valid modes. The current list at of the time of this writing is:

      0:  tiling
      1:  integer tiling
      2:  mirrored tiling
      3:  integer mirrored tiling
      4:  centered tiling
      5:  centered on a solid background
      6:  centered on a 'warp' background
      7:  centered on a 'brick' background
      8:  symmetrical tiling
      9:  symmetrical mirrored tiling

  The default mode is '0'. See "Root Display Modes" for a description of the different display modes. Also, if you specify a '`-rmode'` option on the command line, it is not necessary to also specify the '`-root'` option.

  (Resource name: `rootMode` . Type: integer)

-/+nore`setroot`
  Lets you turn off the clearing of the root window that happens when you switch from a 'root' display mode back to the 'window' display mode. Handy if you're trying to create a neat mirrored root tile, and you have to keep adjusting your cropping. Or something like that.

  (Resource name: `resetroot` . Type: boolean)

-rf`g` color
  Sets the 'foreground' color used in some of the root display modes.
  (Resource name: `rootForeground` . Type: string)
-rb`g` color
  Sets the 'background' color used in some of the root display modes.
  (Resource name: `rootBackground` . Type: string)
-/+max
  Makes xv automatically stretch the image to the full size of the screen. This is mostly useful when you want xv to display a background. While you could just as well specify the dimensions of your display ('-geom 1152x900' for example), the `-max` option is display-independent. If you decide to start working on a 1280x1024 display the same command will still work. Note: If you specify `-max` when you aren't using `-root` , the behavior is slightly different. In this case, the image will be made as large as possible while still preserving the normal aspect ratio.

  (Resource name: <none>)

-/+maxp`ect`
  Makes the image as large as possible while preserving the aspect ratio, whether you're in a 'root' mode or not.
  (Resource name: <none>)
-/+quit
  Makes xv display the (first) specified file and exit, without any user intervention. Since images displayed on the root window remain there until explicitly cleared, this is very useful for having xv display background images on the root window in some sort of start-up script.

  If you aren't using a 'root' mode, this option will make xv exit as soon as the user clicks any mouse button in the image window. This is useful if you are calling xv from some other program to display an image.

  (Resource name: <none>)

-/+cle`ar`
  Clears the root window of any xv images. Note: it is not necessary to do an '`xv -clear'` before displaying another picture in the root window. xv will detect that there's an old image in the root window and automatically clear it out (and free the associated colors).

  (Resource name: <none>)

## Window Options

xv currently consists has several top-level windows, plus one window for the actual image. These windows (the xv controls window, the xv info window, the xv color editor window, the xv comments window, the xv text viewer window, and the xv visual schnauzer) may be automatically mapped and positioned when the program starts.

-/+cma`p`
  Maps the xv controls window.
  (Resource name: `ctrlMap` . Type: boolean)
-cge`om` geom
  Sets the initial geometry of the xv controls window. Note: only the position information is used. The window is of fixed size.
  (Resource name: `ctrlGeometry` . Type: string)
-/+im`ap`
  Maps the xv info window.
  (Resource name: `infoMap` . Type: boolean)
-ig`eom` geom
  Sets the initial geometry of the xv info window. Note: only the position information is used. The window is of fixed size.
  (Resource name: `infoGeometry` . Type: string)
-/+cem`ap`
  Maps the xv color editor window.
  (Resource name: `ceditMap` . Type: boolean)
-ceg`eom` geom
  Sets the initial geometry of the xv color editor window. Note: only the position information is used. The window is of fixed size.
  (Resource name: `ceditGeometry` . Type: string)
-/+cmtm`ap`
  Maps the xv comments window.
  (Resource name: `commentMap` . Type: boolean)
-cmtg`eometry` geom
  Sets the initial geometry of the xv comments window.
  (Resource name: `commentGeometry` . Type: string)
-tg`eometry` geom
  Sets the initial geometry for any TextView windows (other than the xv comments window).
  (Resource name: `textviewGeometry` . Type: string)
-/+vsm`ap`
  Maps an xv visual schnauzer window.
  (Resource name: `vsMap` . Type: boolean)
-vsg`eometry` geom
  Sets the initial geometry of the xv visual schnauzer windows.
  (Resource name: `vsGeometry` . Type: string)
-/+nop`os`
  Turns off the 'default' positioning of the various xv windows. Every time you open a window, you will be asked to position it. (Assuming your window manager asks you such things. mwm, for instance, doesn't seem to ask)
  (Resource name: `nopos` . Type: boolean)