XLOADIMAGE - 16 November 1992
xloadimage, xview - load images into an X11 window or onto the root window
USAGE: xloadimage [global_options] {[image_options] image ...}
If the filename STDIN is given, xloadimage will read the image from standard input.
To have a "slideshow" of many images supply multiple image file names on the command line. The 'n', 'return', and 'space' keys will proceed to the next image and 'p' will return to the previous when the keyboard focus is on the window. Also see the -delay, -idelay, and -goto options.
You may exit the window by typing 'q' or '^C' when the keyboard focus is on the window.
If the destination display cannot support the number of colors in the image, the image will be dithered (monochrome destination) or have its colormap reduced (color destination) as appropriate. This can also be done forcibly with the -halftone, -dither, and -colors options.
A variety of image manipulations can be specified, including gamma correction, brightening, clipping, dithering, depth-reduction, rotation, and zooming. Most of these manipulations have simple implementations; speed was opted for above accuracy.
If you are viewing a large image in a window, the initial window will be at most 90% of the size of the display unless the window manager does not correctly handle window size requests or if you've used the -fullscreen option. You may move the image around in the window by dragging with the first mouse button. The cursor will indicate which directions you may drag, if any.
A wide variety of common image manipulations can be done by mixing and matching the available options. See the section entitled HINTS FOR GOOD IMAGE DISPLAYS for some ideas.
xview is equivalent to xloadimage -view -verbose
When zooming color images up you can reduce blockiness with -smooth. For zooms of 300% or more, I recommend two smoothing passes (although this can take awhile to do on slow machines). There will be a noticable improvement in the image.
You can perform image processing on a small portion of an image by loading the image more than once and using the -merge, -at and -clip options. Load the image, then merge it with a clipped, processed version of itself. To brighten a 100x100 rectangular portion of an image located at (50,50), for instance, you could type:
If you're using a display with a small colormap to display colorful images, try using the -gray option to convert to grayscale.
For a more-or-less complete list of other contributors (there are a lot of them), please see the README file enclosed with the distribution.
xloadimage - the image loader and viewer xsetbg - pseudonym which quietly sets the background xview - pseudonym which views in a window /usr/lib/X11/Xloadimage - default system-wide configuration file ~/.xloadimagerc - user's personal configuration file
Xloadimage is copywritten material with a very loose copyright allowing unlimited modification and distribution if the copyright notices are left intact. Various portions are copywritten by various people, but all use a modification of the MIT copyright notice. Please check the source for complete copyright information. The intent is to keep the source free, not to stifle its distribution, so please write to me if you have any questions.
Images can come in a variety of aspect ratios. Xloadimage cannot detect what aspect ratio the particular image being loaded has, nor the aspect ratio of the destination display, so images with differing aspect ratios from the destination display will appear distorted. See HINTS FOR GOOD IMAGE DISPLAYS for more information.
The GIF format allows more than one image to be stored in a single GIF file, but xloadimage will only display the first.
Only GIF87a format is supported.
One of the pseudonyms for xloadimage, xview, is the same name as Sun uses for their SunView-under-X package. This will be confusing if you're one of those poor souls who has to use Sun's XView.
Some window managers do not correctly handle window size requests. In particular, many versions of the twm window manager use the MaxSize hint instead of the PSize hint, causing images which are larger than the screen to display in a window larger than the screen, something which is normally avoided. Some versions of twm also ignore the MaxSize argument's real function, to limit the maximum size of the window, and allow the window to be resized larger than the image. If this happens, xloadimage merely places the image in the upper-left corner of the window and uses the zero-value'ed pixel for any space which is not covered by the image. This behavior is less-than-graceful but so are window managers which are cruel enough to ignore such details.
The order in which operations are performed on an image is independent of the order in which they were specified on the command line. Wherever possible I tried to order operations in such a way as to look the best possible (zooming before dithering, for instance) or to increase speed (zooming downward before compressing, for instance).