XSHOWGIF(1) XSHOWGIF(1) 27 April 1990 NAME xshowgif - load gif images into an X11 window SYNOPSIS xshowgif [global_options] {[image_options] image ...} DESCRIPTION Xshowgif displays gif images in a X11 window. Xshowgif is a pared down version of Jim Frost's (jimf@saber.com) xloadimage program. Unlike xloadimage this program only displays GIF files in a X11 Window. Support for alternate image types and loading images into the root window have been removed. These features were removed so the program could support some additional GIF file features that cannot be supported in conjunction with these other features such as display of multiple GIF images in a file. If an image is larger then the window, you may move the image around in the window by dragging with the left mouse button. The cursor will indicate which directions you may drag, if any. You may exit the window by typing 'q', 'Q' or '^C' when the keyboard focus is on the window. If more then one image is specified on the command line, 'N' moves you to the next gif file, while 'P' moves you to the previous gif file. If the gif file contains more then one image 'n' moves you to the next image in the gif file. If there are no more images in the file, 'n' moves to the next file on the command line. 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 and -colors options. A variety of image manipulations can be specified, including brightening, clipping, dithering, depth-reduction, and zooming. Most of these manipulations have simple implementations; speed was opted for above accuracy. 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. GLOBAL OPTIONS The following options affect the global operation of xshowgif. They may be specified anywhere on the command line. -border color This sets the background portion of the window which is not covered by any images to be color. -display display_name X11 display name to send the image(s) to. - 1 - Formatted: November 14, 2024 XSHOWGIF(1) XSHOWGIF(1) 27 April 1990 -geometry WxH[{+-X}{+-}Y] This sets the size of the window onto which the images are loaded to a different value than the size of the image. This can be used to reduce the size of the destination window. -help Displays a short summary of xshowgif command line syntax. -quiet Forces xshowgif to be quiet. Normally xshowgif will display the image size and colormap depth. -verbose Causes xshowgif to be talkative, telling you and any special processing that it has to do. -version Print the version number and patchlevel of this version of xshowgif. The following options may preceed each image. These options are local to the image they preceed. -background color Use color as the background color instead of the default (usually white but this depends on the image type) if you are transferring a monochrome image to a color display. -brighten percentage Specify a percentage multiplier for a color image's colormap. A value of more than 100 will brighten an image, one of less than 100 will darken it. -colors n Specify the maximum number of colors to use in the image. This is a way to forcibly reduce the depth of an image. -clip X,Y,W,H Clip the image before loading it. X and Y define the upper-left corner of the clip area, and W and H define the extents of the area. A zero value for W or H will be interpreted as the remainder of the image. -dither Dither a color image to monochrome. This algorithm is very trivial; the -halftone option may look better if you don't mind the blown-up image. -foreground color Use color as the foreground color instead of black if you are transferring a monochrome image to a color display. This can also be used to invert the foreground and background colors of a monochrome image. - 2 - Formatted: November 14, 2024 XSHOWGIF(1) XSHOWGIF(1) 27 April 1990 -halftone Force halftone dithering of a color image when displaying on a monochrome display. This happens by default when viewing color images on a monochrome display. This option is ignored on monochrome images. This dithering algorithm blows an image up by sixteen times; if you don't like this, the -dither option will not blow the image up (but won't look as nice). -name image_name Force the next argument to be treated as an image name. This is useful if the name of the image is -dither, for instance. -xzoom percentage Zoom the X axis of an image by percentage. A number greater than 100 will expand the image, one smaller will compress it. A zero value will be ignored. -yzoom percentage Zoom the Y axis of an image by percentage. See -xzoom for more information. -zoom percentage Zoom both the X and Y axes by percentage. See -xzoom for more information. Technically the percentage actually zoomed is the square of the number supplied since the zoom is to both axes, but I opted for consistency instead of accuracy. EXAMPLES To double the size of an image: xshowgif -zoom 200 my.gif To halve the size of an image: xshowgif -zoom 50 my.gif To brighten a dark image: xshowgif -brighten 150 my.gif To darken a bright image: xshowgif -brighten 50 my.gif HINTS FOR GOOD IMAGE DISPLAYS Since images are likely to come from a variety of sources, they may be in a variety of aspect ratios which may not be supported by your display. The -xzoom and -yzoom options can be used to change the aspect ratio of an image before display. If you use these options, it is recommended that you increase the size of one of the dimensions instead of shrinking the other, since shrinking looses detail. For - 3 - Formatted: November 14, 2024 XSHOWGIF(1) XSHOWGIF(1) 27 April 1990 instance, many GIF images have an X:Y ratio of about 2:1. You can correct this for viewing on a 1:1 display with either -xzoom 50 or -yzoom 200 (reduce X axis to 50% of its size and expand Y axis to 200% of its size, respectively) but the latter should be used so no detail is lost in the conversion. One common complaint is that xshowgif does not have a -reverse function for inverting monochrome images. In fact, this function is a special-case of the foreground and background coloring options. To invert an image with a black foreground and white background (which is standard), use -foreground white -background black. This will work on both color and monochrome displays. AUTHOR Modifications to xloadimage by Richard J. Greco Intel Scientific Computers rjg@isc.intel.com Xloadimage was written by Jim Frost Saber Software jimf@saber.com Other contributing people include Barry Shein (bzs@std.com), Kirk Johnson (tuna@athena.mit.edu), Mark Snitily (zok!mark@apple.com), W. David Higgins (wdh@mkt.csd.harris.com), and Dave Nelson (daven@gauss.llnl.gov). COPYRIGHT Copyright (c) 1989, 1990 Jim Frost and others. Xshowgif is a derivitive work of xloadimage by Jim Frost et. al. and is subject to all copyright restrictions of xloadimage. 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. BUGS Zooming dithered images, especially downwards, is UGLY. The dithering algorithm used by -dither could be better, and both -dither and -halftone assume that a color's brightness is the sum of its RGB values, which is not correct but has the advantage of being simple and fast. - 4 - Formatted: November 14, 2024 XSHOWGIF(1) XSHOWGIF(1) 27 April 1990 Images can come in a variety of aspect ratios. Xshowgif 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. Only PseudoColor, GrayScale, StaticColor, and StaticGray visuals are supported. These are the most common visuals so this isn't usually a problem. 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, xshowgif 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). - 5 - Formatted: November 14, 2024