Image Manipulation Options

When specified, tells xv to automatically issue a Dither command whenever an image is first displayed. Useful on displays with limited color capabilities (4-bit and 6-bit displays), or in conjunction with the '-ncols' option.
(Resource name: autoDither . Type: boolean)
When specified, tells xv to automatically issue a Smooth command whenever an image is first displayed. This is useful when you are using one of the image sizing options (such as '-expand' or '-max').
(Resource name: autoSmooth . Type: boolean)
Forces xv to display the image in Raw mode. Mainly used to override the autoDither or autoSmooth resources. Can also be used to turn off the automatic dithering and smoothing that occurs when you are using Use Std. Colormap mode or when an image is shrunk to fit the screen.
(Resource name: autoRaw . Type: boolean)
-crop x y w h
Tells xv to automatically crop the specified region of the image. The rectangle is specified in image coordinates, which remain constant (regardless of any expansion/compression of the displayed image). This is useful if you want to view a series of images, and you only want to see one common area of the images. For example, you may have the GIF weather maps of the United States, but only want to display your general region of the country.
(Resource name: <none>)
When specified, tells xv to automatically issue an AutoCrop command whenever an image is first displayed.
(Resource name: autoCrop . Type: boolean)
Automatically issues a 4x3 command whenever an image is loaded.
(Resource name: auto4x3 . Type: boolean)
Automatically issues a 'horizontal flip' command whenever an image is loaded.
(Resource name: autoHFlip . Type: boolean)
Automatically issues a 'vertical flip' command whenever an image is loaded.
(Resource name: autoVFlip . Type: boolean)
-rotate deg
Automatically rotates the image by the specified amount whenever an image is loaded. deg can be 0, 90, 180, or 270. Positive values rotate the image clockwise, negative values rotate the image counter-clockwise.
(Resource name: autoRotate . Type: integer)
Automatically issues a Norm command (to normalize the contrast of an image) whenever an image is loaded.
(Resource name: autoNorm . Type: boolean)
Automatically issues a HistEq command (to do histogram equalization) whenever an image is loaded.
(Resource name: autoHist . Type: boolean)
-gamma val
Sets the Intensity graph (in the xv color editor window) to the gamma function of the specified value.
(Resource name: <none>)
-cgamma rv gv bv
Sets the Red, Green, and Blue graphs in the xv color editor window to the gamma functions of the specified values.
(Resource name: <none>)
-preset preset
Makes the specified preset (in the xv color editor) the default. It does this by swapping the specified preset ( 1 , 2 , 3 , or 4 ) with the settings associated with the Reset button.
(Resource name: defaultPreset . Type: integer)

Miscellaneous Options

Forces the image to be displayed in greyscale. This is most useful when you are using certain greyscale X displays. While xv attempts to determine if it's running on a greyscale display, many X displays lie, and claim to be able to do color. (This is often because they have color graphics boards hooked up to b/w monitors. The computer, of course, has no way of knowing what type of monitor is attached.) On these displays, if you don't specify -mono , what you will see is a greyscale representation of one of the RGB outputs of the system. (For example, you'll see the 'red' output on greyscale Sun 3/60s.) The -mono option corrects this behavior.
(Resource name: mono . Type: boolean)
Makes xv display a 'negative' of the loaded image. White becomes black, and black becomes white. Color images will have 'interesting' effects, as the RGB components are individually reversed. For example, red (255,0,0) will become cyan (0,255,255), yellow will become blue, and so on.
-white color
Specifies the 'white' color used when the picture is b/w stippled. (When '-ncols 0' has been specified, or when viewing a b/w image.)
(Resource name: white . Type: string)
-black color
Specifies the 'black' color used when the picture is b/w stippled. (When '-ncols 0' has been specified, or when viewing a b/w image.) Try something like: 'xv -ncols 0 -bl red -wh yellow <filename>' for some interesting, late-60's- style psychedelia effects.
(Resource name: black . Type: string)
-wait secs
Turns on a 'slide-show' feature. Normally, if you specify multiple input files, xv will display the first one, and wait for you to give the Next command (or whatever). The -wait option makes xv wait for the specified number of seconds, and then go on to the next picture, without any user intervention. The program still accepts commands, so it's possible to 'abort' the current picture without waiting the full specified time by using the Next command.

Note: If you are in Use Std. Colormap mode, and you use -wait 0 , the images will not be dithered (as they normally are when you are in Use Std. Colormap mode). It's assumed that if you said '-wait 0' that you want the images displayed at maximum speed. You can still turn the dithering on if you desire by using the -dither option.

(Resource name: <none>)

Normally, when running a slide-show with the -wait option, xv will terminate after displaying the last image. If you also specify the -wloop option, the program will loop back to the first image and continue the slide-show until the user issues the Quit command.
(Resource name: <none>)
Makes xv display multiple image files in a random order. Useful for breaking up the monotony of having slide-shows always display in the same order. Also, if you also use the -quit option, you can have xv display a single, random file from a list of files. This may be useful if you'd like xv to pick a random 'background image' from some set of files.
(Resource name: <none>)
If you were on a PseudoColor display, xv used to automatically clear the image window (and the root window, if using a root mode) whenever you loaded a new image. This was to prevent the potentially annoying/confusing 'rainbow' effect that happens when colormap entries are freed and reallocated with different colors. This has changed. By default, xv no longer clears the image/root window. This is for two reasons: I've decided the rainbow effect is semi-entertaining, in that it gives you something to look at while the next image is being loaded. Secondly, if you are viewing a series of images that have the same colors in them, it's possible for xv to animate them (by using the '-wait' command line option), albeit no faster than one frame every 1-2 seconds. For example, you can go get the satellite radar images from (in the directory wx), run 'xv -wait 0 SA*', and voila! Just like the evening news!
(Resource name: clearOnLoad Type: boolean)
Whenever you load a new image, xv normally frees the colors it was using for the previous image, and allocates new colors for the new image. This can cause 'rainbow' effects on PseudoColor displays as the colors are changed. You can avoid this problem entirely by using the -nofreecols option, which suppresses the normal freeing of old colors. This is most useful when doing slide-shows. Note, however that there will be fewer colors available for 'later' images. These images will wind up being displayed with whatever colors were allocated for the earlier images. As such, they may or may not look that hot... (And allow me to reiterate: xv is not an image animator, despite options like these that let it do so, albeit poorly.)
(Resource name: <none>)
Specifies that, by default, the colormap editing dials in the xv color editor window should be in RGB mode. This is the normal default behavior.
(Resource name: hsvMode . Type: boolean ( false))
Specifies that, by default, the colormap editing dials in the xv color editor window should be in HSV mode.
(Resource name: hsvMode . Type: boolean ( true))
Turns on the Browse checkbox in the xv load window. This keeps the window from being automatically closed whenever you successfully load an image.
(Resource name: loadBrowse . Type: boolean)
Speeds up the performance of the xv load and xv save windows. (Which are really the same window...) It keeps xv from doing a stat() system call for each file in the current directory whenever you change directories. This is handy on systems with a lot remote files, where doing the stat() calls takes too long. One downside: subdirectories will not be shown with the little folder icons, as it requires a stat() call to determine whether a file is a subdirectory or a data file. This will not affect the operation of the program, just the 'niceness'.
(Resource name: nostat . Type: boolean)
-visual vistype
Normally, xv uses the 'best' visual model it can get. It looks for a 24 or 32-bit deep TrueColor, or DirectColor visual. If it can get one, that's what it uses. Otherwise, it will fall back to using the 'default' visual provided by your X server. You can override this bit of cleverness by explicitly selecting a visual to use. Valid types are StaticGray, StaticColor, TrueColor, GrayScale, PseudoColor, DirectColor, and default. All of these modes are not necessarily provided on any given X display. Run xdpyinfo on your display to find out what visual types are supported. You can also specify a specific visual by using its numeric visual ID, in the case that you have multiple instances of a given visual type available ( xv will pick the 'deepest' one by default)
(Resource name: visual . Type: string)
-cursor curs
Specifies an alternate cursor to use in the image window (instead of the normal 'arrow' cursor). curs values are obtained by finding the character number of a cursor you like in the 'cursor' font. (Run 'xfd -fn cursor' to display the cursor font.) For example, a curs value of '56' corresponds to the (singularly useless) 'Gumby' cursor.
(Resource name: cursor . Type: integer)
By default, xv prevents the image window from ever getting larger than the screen. Unfortunately, because of this, if you load an image that is larger than your screen, the image will be shrunk until it fits on your screen. Some folks find this undesirable behavior. Specifying the -2xlimit option doubles the size limitations. The image window will be kept from getting larger than 2x the width and height of your screen.

Just in case you're wondering why there are any size limitations: it's fairly easy to accidentally ask for a huge image to be generated. Simply Crop a section of the image, zoom so you can see the individual pixels, and UnCrop . If there were no size limitations, the (expanded many times) image could be huge, and might crash your X server. At the very least, it would take a long time to generate and transmit to your X server, and would freeze up your X server during part of it. Generally undesirable behavior.

(Resource name: 2xlimit . Type: boolean)

For the truly daring, this turns off all limitations on the maximum size of an image. (Well, there's still an X-imposed maximum size of 64K by 64K, but that really shouldn't be a problem.) Warning: as mentioned above, it is fairly easy to accidentally generate a huge image when you do an UnCrop command, and you may well crash xv, your X server, the host machine, or all three. Use At Your Own Risk!!!
(Resource name: nolimits Type: boolean)
If specified, iconifying the xv image window will automatically close all the other xv windows. De-iconifying the xv image window will re-open the other xv windows.
(Resource name: autoClose . Type: boolean)
Starts xv with its image window iconified.
(Resource name: iconic . Type: boolean)
-icgeometry geom
Specifies the screen position of the icon (when you use the -iconic option).
(Resource name: iconGeometry . Type: string)
-dir directory
Specifies an initial directory for xv to switch to when run. Also specifies the default directory used for the visual schnauzer and the xv load and xv save windows.
(Resource name: searchDirectory . Type: string)
-flist fname
Tells xv to read a file fname that consists of a list of names of image files to load, one per line. This file is in the same format generated by the File list checkbox in the xv save window. You can use this to get around shell 'command-length' limitations (which can hit you if you try 'xv *' in a directory with a thousand or two files), or you could have find (or whatever) generate this file based on some type of criteria (age, size, etc.)
(Resource name: fileList . Type: string)
-drift dx dy
A kludge. In order to do certain operations, xv needs to be able to precisely position the contents of an image window on the screen. Unfortunately, window managers disagree wildly on exactly how the "where's the window" information will be presented to the program. The practical upshot is that, despite a sizable effort to the contrary, xv may very will have its image window 'drift' on the screen as you resize it. This option lets you specify correction factors to cancel out the drift. If the window drifts down and to the right, use negative values to cancel the drifting. If the window drifts up and to the left, use positive values to cancel the drifting.
(Resource name: driftKludge . Type: string)
-mfn font
Lets you specify the mono-spaced font used in the TextView windows, and a few other places. Be sure you use a mono-spaced font, or you may well get 'interesting' effects.
(Resource name: monofont . Type: string)
-name string
Lets you change what string is displayed in the titlebar of the image window. Normally, xv will display the version number and the filename. If you're calling xv from another program, you may prefer to have it print a more descriptive string, or perhaps something like '<click mouse to quit>' if you're also using the -quit option.
(Resource name: <none>)
For use when calling xv from some other program. Forces all user input to be ignored. This keeps the untrained (or inquisitive) user from nosing around, creating files, or just generally misbehaving. Also note that there's no way for the user to quit the program. It is up to the calling process to manually kill xv when it feels that the image has been displayed long enough.
(Resource name: <none>)
-/+grabdelay seconds
Sets the default 'grab delay' in the Grab dialog box. See "The Grab Command" .
(Resource name: <none>)
Turns file polling on. If enabled, xv will notice when the currently displayed image file changes (due to some other process rewriting it, or something like that), and it will automatically reload the image file once it appears to have settled down (once the file size stops changing for a few seconds). See "Image Reloading" for further details.
(Resource name: <none>)
Normally, the visual schnauzer uses its own private colormap. This is necessary in order to get a good set of colors to display the image icons, and not steal colors away from the actual image window. However, you may find the colormap install/deinstall very annoying. I do. You can specify this option ( +vsperfect ) to turn the 'perfect' behavior off. If you do so, the visual schnauzer windows will steal away a small (64-entry) part of the colormap (unless you are in Use Std. Colormap mode, in which case they will share the standard colormap). The downside is that neither the schnauzer nor the image will look as good.
(Resource name: vsPerfect . Type: boolean)
Completely disables the visual schnauzer. This is mainly so, if you have vsPerfect turned off, you can disable the schnauzer and keep it from stealing any colors from the image. In the default setting ( vsPerfect is turned on), this option will have no useful effect.
(Resource name: vsDisable . Type: boolean)
-gsdev str
Sets the 'device' that the ghostscript package will generate output for, which is used whenever you read a PostScript file in xv. Currently, the default device is ppmraw , which means all PostScript will be converted to either a 24-bit color PPM file, an 8-bit greyscale PGM file, or a 1-bit black- and-white PBM file, as appropriate (based on the particular PostScript file in question). Note that your copy of ghostscript must be configured to support this device, and any other values you may wish to set this option to. See the xv Makefile for further information.

Also note: Be very careful when using these options, as it's pretty easy to have ghostscript generate enormous data files. For example, for normal 8" by 11" pages, at 72dpi, a PBM file will require ~60K per page, a PGM file will require ~500K per page, and a PPM file will require ~1.5M per page. If you have it generate images at 300 dpi (see below), these sizes explode to roughly 1, 8, and 24 megabytes per page. As such, you should forget about viewing color pages at 300 dpi, and you may also want to forget about viewing multi-page PostScript files at 300 dpi.

(Resource name: gsDevice . Type: string)

-gsres res
Specifies the resolution of the page files generated by ghostscript, in dots per inch. Defaults to 72 dpi. You can set it to any value, but be careful about generating enormous intermediate datafiles.
(Resource name: gsResolution . Type: integer)
-gsgeom geom
Sets the page size of the files generated by ghostscript. Normally, this defaults to '612x792', which is the size of 8" by 11" paper, as measured in 72nds of an inch. Note that these numbers are in 72nds of an inch regardless of the resolution (dpi) value set by gsResolution .
(Resource name: gsGeometry . Type: string)
Turns off certain decorations on the xv image window's frame, maybe. Works for mwm, at least. There is no way to do this trick with olwm, and twm doesn't need it. Anyway, if you turn off the titlebar and such on the xv image window, it removes the minimum size constraint/problem that I talk about in "Cropping" , and elsewhere.
(Resource name: nodecor Type: boolean)
If specified, deletes all files specified on the xv command line when xv exits. This can be handy if you're using xv as an external viewer, and you'd like to hand it a file, have it displayed, and then have it go away.
(Resource name: <none>)
-DEBUG level
Turns on some debugging information. You shouldn't need this. If everything worked perfectly, I wouldn't need this.
(Resource name: <none>)
Specifying '-' all by itself tells xv to take its input from stdin , rather than from a file. This lets you put xv on the end of a Unix pipe.