XLOADIMAGE(1) USER COMMANDS XLOADIMAGE(1) NAME xloadimage, xsetbg, xview - load images into an X11 window or onto the root window SYNOPSIS _x_l_o_a_d_i_m_a_g_e [global_options] {[image_options] image ...} DESCRIPTION _X_l_o_a_d_i_m_a_g_e displays images in an X11 window or loads them onto the root window. See the _I_M_A_G_E _T_Y_P_E_S section below for supported image types. Compressed images will automatically be uncompressed. 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 destina- tion) as appropriate. This can also be done forcibly with the -_d_i_t_h_e_r and -_c_o_l_o_r_s options. If more than one image is to be loaded, they will be merged into a single image. The -_a_t and -_c_e_n_t_e_r options control where subsequent images will be loaded onto the initial image. Any combination of color image depths and/or mono- chrome images may be loaded at one time. A variety of image manipulations can be specified, including brightening, clipping, dithering, depth-reduction, and zoom- ing. Most of these manipulations have simple implementa- tions; 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. You may move the image around in the window by dragging with the first mouse button. The cursor will indicate which direc- tions you may drag, if any. You may exit the window by typ- ing 'q' or 'Q' when the keyboard focus is on the window. _X_s_e_t_b_g is equivalent to _x_l_o_a_d_i_m_a_g_e -_o_n_r_o_o_t -_q_u_i_e_t and _x_v_i_e_w is equivalent to _x_l_o_a_d_i_m_a_g_e -_v_i_e_w -_v_e_r_b_o_s_e. GLOBAL OPTIONS The following options affect the global operation of _x_l_o_a_d_i_m_a_g_e. They may be specified anywhere on the command line. -border _c_o_l_o_r This sets the background portion of the window which is not covered by any images to be _c_o_l_o_r. -colors _n Specify the maximum number of colors to use in the image. This is a way to forcibly reduce the depth Sun Release 4.1 Last change: 7 October 1989 1 XLOADIMAGE(1) USER COMMANDS XLOADIMAGE(1) of an image. -display _d_i_s_p_l_a_y__n_a_m_e X11 display name to send the image(s) to. -geometry _W_x_H[{+-_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. When viewing an image in a window, this can be used to reduce the size of the destina- tion window. When loading an image onto the root window, this option controls the size of the pixmap which will be loaded onto the root. If the size is smaller than that of the display, the image will be replicated. -install Forcibly install the image's colormap when the win- dow is focused. This violates ICCCM standards and only exists to allow operation with naive window managers. Use this option only if your window manager does not install colormaps properly. -list List the images which are along the image path. -help Displays a short summary of xloadimage command line syntax. -onroot Load image(s) onto the root window instead of view- ing in a window. This is the opposite of -_v_i_e_w. _X_S_e_t_b_g has this option set by default. -path Displays the image path and image suffixes which will be used when looking for images. These are loaded from ~/.xloadimagerc and optionally from a systemwide file (normally /usr/lib/xloadimagerc). -quiet Forces _x_l_o_a_d_i_m_a_g_e and _x_v_i_e_w to be quiet. This is the default for _x_s_e_t_b_g, but the others like to whis- tle. -supported List the supported image types. -verbose Causes _x_l_o_a_d_i_m_a_g_e to be talkative, telling you what kind of image it's playing with and any special pro- cessing that it has to do. This is the default for _x_v_i_e_w and _x_l_o_a_d_i_m_a_g_e. -view View image(s) in a window. This is the opposite of -_o_n_r_o_o_t and the default for _x_s_e_t_b_g. Sun Release 4.1 Last change: 7 October 1989 2 XLOADIMAGE(1) USER COMMANDS XLOADIMAGE(1) IMAGE OPTIONS The following options may preceed each image. These options are local to the image they preceed. -background _c_o_l_o_r Use _c_o_l_o_r 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 _p_e_r_c_e_n_t_a_g_e 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. -center Center the image on the first image loaded. If this is an option to the first image, and the -_o_n_r_o_o_t option is specified, the image will be centered on the display background. -at _X,_Y Indicates coordinates to load the image at on the first image. If this is an option to the first image, and the -_o_n_r_o_o_t option is specified, the image will be loaded at the given location on the display background. -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 Force halftone dithering of a color image when display- ing on a color display. This happens by default when viewing color images on a monochrome display. This option is ignored on monochrome images. -foreground _c_o_l_o_r Use _c_o_l_o_r 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 fore- ground and background colors of a monochrome image. -name _i_m_a_g_e__n_a_m_e Force the next argument to be treated as an image name. This is useful if the name of the image is -_d_i_t_h_e_r, for instance. -xzoom _p_e_r_c_e_n_t_a_g_e Zoom the X axis of an image by _p_e_r_c_e_n_t_a_g_e. A number Sun Release 4.1 Last change: 7 October 1989 3 XLOADIMAGE(1) USER COMMANDS XLOADIMAGE(1) greater than 100 will expand the image, one smaller will compress it. A zero value will be ignored. -yzoom _p_e_r_c_e_n_t_a_g_e Zoom the Y axis of an image by _p_e_r_c_e_n_t_a_g_e. See -_x_z_o_o_m for more information. -zoom _p_e_r_c_e_n_t_a_g_e Zoom both the X and Y axes by _p_e_r_c_e_n_t_a_g_e. See -_x_z_o_o_m for more information. EXAMPLES To load the rasterfile "my.image" onto the background and replicate it to fill the entire background: xloadimage my.image To load a monochrome image "my.image" onto the background, using red as the foreground color, replicate the image, and overlay "another.image" onto it at coordinate (10,10): xloadimage -foreground red my.image -at 10,10 another.image To center the rectangular region from 10 to 110 along the X axis and from 10 to the height of the image along the Y axis: xloadimage -center -clip 10,10,100,0 my.image PATHS AND EXTENSIONS The file ~/.xloadimagerc (and optionally a system-wide file which is system-specific) defines the path and default extensions that _x_l_o_a_d_i_m_a_g_e will use when looking for images. The file can have two statements: "path=" and "extension=" (the equals signs must follow the word with no spaces between). Everything following the "path=" keyword will be prepended to the supplied image name if the supplied name does not specify an existing file. The paths will be searched in the order they are specified. Everything fol- lowing the "extension=" keyword will be appended to the sup- plied image name if the supplied name does not specify and existing file. As with paths, these extensions will be searched in the order they are given. Comments are any por- tion of a line following a hash-mark (#). The following is a sample ~/.xloadimagerc file: # paths to look for images in path= /usr/local/images /home/usr1/guest/madd/images /usr/include/X11/bitmaps Sun Release 4.1 Last change: 7 October 1989 4 XLOADIMAGE(1) USER COMMANDS XLOADIMAGE(1) # default extensions for images; .Z is automatic; scanned in order extension= .csun .msun .sun .face .xbm .bm IMAGE TYPES _X_l_o_a_d_i_m_a_g_e currently supports the following image types: Faces Project images Portable Bitmap (PBM) images Sun monochrome rasterfiles Sun color RGB rasterfiles X10 bitmap files X11 bitmap files Both normal and compact PBM images are supported. Both standard and run-length encoded Sun rasterfiles are sup- ported. AUTHOR Jim Frost Software Tool & Die madd@std.com BUGS Loading images onto the root with PseudoColor or GrayScale displays can cause colormap problems (and may interfere with window manager operation) if there are not enough colors in the default colormap to allocate all of the colors read/write. This can happen on images which have too many unique colors or if images are loaded onto the root in suc- cession. Since there is currently no X standard for chang- ing the root colormap, this problem may or may not be corrected in the future. Since _x_l_o_a_d_i_m_a_g_e does not want a window larger than the image to be displayed, it resizes the window to fit the image if the window manager resizes the window to a size which is too large. This could cause a conflict if the win- dow manager responds to the resize request by resizing the window to the larger size. This should be rare given the state of current window managers and has never been observed. Sun Release 4.1 Last change: 7 October 1989 5