home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / gfx / edit / amigaxv / docs / old_xv.man < prev    next >
Text File  |  1994-12-10  |  111KB  |  2,191 lines

  1.  NAME
  2.       xv - interactive image display for the X Window System
  3.  
  4.  SYNTAX
  5.       xv [options] [filename [filename...]]
  6.  
  7.  NOTE
  8.       This man page is merely the text portion of the (PostScript) xv docs,
  9.       without the figures, and without the appendicies.  As such, it is
  10.       highly recommended that you get your hands on the *real*
  11.       documentation.
  12.  
  13.  DESCRIPTION
  14.       xv is an X11 program that displays images in the GIF, PBM, PGM, PPM,
  15.       X11 bitmap, JPEG, Sun Rastefile, and PM formats on 1-, 4-, 6-, 8-,
  16.       16-, 24-, and 32-bit X displays.  xv will also read compress-ed
  17.       versions of these files.
  18.  
  19.  SECTION 1: OVERVIEW
  20.       xv lets you do a large number of things (many of them actually
  21.       useful), including, but not limited to, the following:
  22.  
  23.       o+  display an image in a window on the screen
  24.  
  25.       o+  display an image on the root window, in a variety of styles
  26.  
  27.       o+  arbitrarily stretch or compress the image
  28.  
  29.       o+  rotate the image in 90-degree steps
  30.  
  31.       o+  flip the image around the horizontal or vertical axes
  32.  
  33.       o+  crop a rectangular portion of the image
  34.  
  35.       o+  magnify any portion of the image by any amount, up to the size of
  36.          the screen
  37.  
  38.       o+  determine pixel values and x,y coordinates in the image
  39.  
  40.       o+  adjust image brightness and contrast with a gamma correction
  41.          function
  42.  
  43.       o+  apply different gamma functions to the Red, Green, and Blue color
  44.          components, to correct for non-linear color response
  45.  
  46.       o+  adjust global image saturation
  47.  
  48.       o+  perform global hue remapping
  49.  
  50.                                     - 1 -     Formatted:  September 27, 1994
  51.  
  52.       o+  edit an image's colormap
  53.  
  54.       o+  reduce the number of colors in an image
  55.  
  56.       o+  dither in color and b&w
  57.  
  58.       o+  smooth an image
  59.  
  60.       o+  crop off solid borders automatically
  61.  
  62.       o+  convert image formats
  63.  
  64.       o+  generate Encapsulated PostScript Unfortunately the Automatic
  65.          Checkbook Balancing Module still isn't completely debugged, and is
  66.          not included in this distribution.
  67.  
  68.  SECTION 2: STARTING XV
  69.       Note: unless explicitly stated otherwise, the term click means "click
  70.       with the Left mouse button."
  71.  
  72.       Start the program up by typing 'xv'.  After a short delay, a window
  73.       will appear with the default image (the xv logo, credits and revision
  74.       date) displayed in it.  If you change the size of the window (using
  75.       whatever method your window manager provides), the image will be
  76.       automatically stretched to fit the window.
  77.  
  78.     Section 2.1: Displaying Pixel Values
  79.       Clicking (and optionally dragging) the Left mouse button inside this
  80.       window will display pixel information in the following format:
  81.  
  82.            196, 137 = 191,121,209 (287 42 81 HSV) The first pair of numbers
  83.            (196,137) are the x and y positions of the cursor, in image
  84.            coordinates.  These numbers remain the same regardless of any
  85.            image resizing, or cropping.  For example, if you click on the
  86.            eye of the fish on the right side of the default image, you'll
  87.            get (approximately) 251,129 regardless of the size of the
  88.            displayed image.  This allows you to zoom in for precise
  89.            measurements.
  90.  
  91.            The first triplet of numbers (191,121,209) are the RGB values of
  92.            the selected pixel.  The components will have integer values in
  93.            the range 0-255.  The values displayed are prior to any HSV/RGB
  94.            modification, but after any colormap changes.  See "Section 5:
  95.            The Color Editor" for details.
  96.  
  97.            The second triplet of numbers (287 42 81) are the HSV values of
  98.            the selected pixel.  The first component will have integer values
  99.            in the range 0-359, and the second and third components will have
  100.            integer values in the range 0-100.  The values displayed are
  101.  
  102.                                     - 2 -     Formatted:  September 27, 1994
  103.  
  104.            prior to any HSV/RGB modification, but after any colormap
  105.            changes.  See "Section 5: The Color Editor" for details.  Also,
  106.            see "Appendix D: RGB and HSV Colorspaces" for more information
  107.            about what these numbers mean.
  108.  
  109.            Note: If you actually want to measure some pixels, it will
  110.            probably help to crop to a small region of your image, and expand
  111.            that region to the point where you can see the individual pixels.
  112.  
  113.            This string is automatically copied to your X server's cut buffer
  114.            whenever you measure pixel values.  This lets you easily feed
  115.            this information to another program, useful if you're doing
  116.            manual feature extraction, or something.  Try it: measure a
  117.            pixel's value, and then go click your Middle mouse button in an
  118.            xterm window.
  119.  
  120.     Section 2.2: Cropping
  121.       Bring up the xv controls window by typing the '?' key or clicking the
  122.       Right mouse button inside the image window.
  123.  
  124.       Clicking and dragging the Middle button of the mouse inside the image
  125.       window will allow you to draw a cropping rectangle on the image.  If
  126.       you're unhappy with the one you've drawn, simply click the Middle
  127.       button and draw another.  If you'd like the rectangle to go away
  128.       altogether, click the Middle button and release it without moving the
  129.       mouse.
  130.  
  131.       You can determine how large the cropping rectangle is (in image
  132.       coordinates) by bringing up the xv info window.  Do this by clicking
  133.       the Info button in the xv controls window or by typing the 'i' key
  134.       into any open xv window.
  135.  
  136.       The xv info window will display, among other things, the current size
  137.       and position of the cropping rectangle in terms of image coordinates.
  138.       For example, if it says:
  139.  
  140.            114x77 rectangle starting at 119,58 that would mean that the
  141.            current cropping rectangle is 114 image pixels wide, 77 image
  142.            pixels high, and its top-left corner is located 119 image pixels
  143.            in from the left edge of the image, and 58 image pixels in from
  144.            the top edge.  These values will be updated as you drag the
  145.            cropping rectangle around.
  146.  
  147.            If you want to set the size or position of the cropping rectangle
  148.            precisely, you can use the arrow keys on your keyboard.  First,
  149.            make the xv info window visible as described above (if it's not
  150.            already visible).  Second, use the mouse to draw a rough
  151.            approximation of the cropping rectangle that you want.  You can
  152.            now use the arrow keys to move the cropping rectangle around the
  153.            image.  Once you've gotten the top and left sides of the cropping
  154.  
  155.                                     - 3 -     Formatted:  September 27, 1994
  156.  
  157.            rectangle precisely where you want them, you can move the
  158.            bottom-right corner of the cropping rectangle (only) by holding
  159.            the <shift> key down while using the arrow keys.  Pressing the up
  160.            arrow will make the rectangle shorter, and pressing the down
  161.            arrow will make the rectangle taller.
  162.  
  163.            Once you have a cropping rectangle that you can live with, you
  164.            can proceed with the actual cropping operation.  Click the Crop
  165.            button in the xv controls window, or type the 'c' key in any open
  166.            xv window.  The image window will shrink to show only portions of
  167.            the image that were inside the cropping rectangle.
  168.  
  169.            Note: if you are running a window manager such as mwm, which
  170.            decorates windows with a title bar, resizing regions, and such,
  171.            it is quite possible that the aspect ratio of the cropped image
  172.            will get screwed up.  This is because certain window managers
  173.            enforce a minimum window size.  If you try to crop to a rectangle
  174.            that is too small, the window manager will create the smallest
  175.            window it can, and the image will be stretched to fit this
  176.            window.  If this happens, you can press the Aspect button in the
  177.            xv controls window, or type the 'a' key in any open xv window.
  178.            This will expand the image so that it has the correct aspect
  179.            ratio again.
  180.  
  181.            You can crop a cropped image by repeating the same steps (drawing
  182.            a new cropping rectangle and issuing the Crop command), ad
  183.            infinitum.
  184.  
  185.            You can return to the original, uncropped image by using the
  186.            UnCrop command.  Simply click the UnCrop button or type the 'u'
  187.            key in any open xv window.
  188.  
  189.            Note that if you try to make the cropping rectangle too small in
  190.            either width or height (under 5 screen pixels), it'll just turn
  191.            itself off.  If you want to crop a very small portion of an
  192.            image, you'll probably have to do it in two passes.  First, crop
  193.            to a small (but large enough to still be enabled) rectangle,
  194.            expand that region, then crop again.
  195.  
  196.  SECTION 3:     THE CONTROL WINDOW
  197.       The xv controls window is the central point of control for the
  198.       program, hence the name.  It provides controls to resize the current
  199.       image, flip and rotate it, load and save different files, and bring up
  200.       the other xv windows.  It can be brought up by clicking the Right
  201.       mouse button in the image window, or by typing the '?' key inside any
  202.       open xv window.  Doing either of these things while the xv controls
  203.       window is visible will hide it.
  204.  
  205.       All of the following commands may be executed by either clicking the
  206.       appropriate command button, or typing the keyboard equivalent (where
  207.  
  208.                                     - 4 -     Formatted:  September 27, 1994
  209.  
  210.       given) into any open xv window.
  211.  
  212.     Section 3.1: Resizing Commands
  213.       Note that none of the 'resizing' commands modify the image in any way.
  214.       They only affect how the image is displayed.  The image remains at its
  215.       original size.  This allows you to arbitrarily stretch and compact the
  216.       image without compounding error caused by earlier resizing.  In each
  217.       case, the displayed image is recomputed from the original internal
  218.       image.
  219.  
  220.       Normal  (Keyboard equivalent 'n')
  221.            Attempts to return the image to its normal size, where one image
  222.            pixel maps to one screen pixel.  For example, if the image (or
  223.            the current cropped portion of the image) has a size of 320x200,
  224.            this command will attempt to make the image window be 320 screen
  225.            pixels wide by 200 screen pixels high.
  226.  
  227.            This command may fail in two cases.  If you're running a window
  228.            manager (such as mwm) that enforces a minimum window size, and
  229.            the 'normal' size is too small, the image may get distorted.  See
  230.            the note in "Section 2.2: Cropping" for more information.
  231.  
  232.            Also, if the image is larger than the size of your screen, it
  233.            will be 'halved' until it fits on the screen.  For example, if
  234.            you try to display a 1400x900 image on a 1280x1024 screen, the
  235.            Normal command will display a 700x450 image.
  236.  
  237.       Max Size  (Keyboard equivalent 'm')
  238.            This command will make the displayed image be the same size as
  239.            the screen.  If you are running a window manager that puts up a
  240.            titlebar, you'll find that the titlebar is now off the top of the
  241.            screen.  To get the titlebar back, simply shrink the image to
  242.            anything smaller than the size of the screen.  The window will be
  243.            moved so that the titlebar is once again visible.
  244.  
  245.       Maxpect  (Keyboard equivalent 'M')
  246.            Makes the image as large as possible, while preserving the aspect
  247.            ratio.  This avoids the generally unwanted image distortion that
  248.            Max Size is capable of generating.  For example, if you have a
  249.            320x200 image, and an 1280x1024 screen, doing the Maxpect command
  250.            will result in an image that is 1280x800.  Max Size, on the other
  251.            hand, would've generated an image of size 1280x1024, which would
  252.            be appear 'stretched' vertically.
  253.  
  254.       Dbl Size  (Keyboard equivalent '>')
  255.            Doubles the current size of the image, with the constraint that
  256.  
  257.                                     - 5 -     Formatted:  September 27, 1994
  258.  
  259.            neither axis is allowed to be larger than the screen.  For
  260.            example, given a 320x200 image and a 1280x1024 screen, the image
  261.            can be doubled once (to 640x400), a second time (to 1280x800),
  262.            but a third time would make the image 1280x1024.  You'll note
  263.            that on the third time, the width didn't change at all, since it
  264.            was already at its maximum value.  Also note that the height
  265.            wasn't allowed to double (from 800 to 1600), but was truncated at
  266.            its maximum value (1024).
  267.  
  268.       Half Size  (Keyboard equivalent '<')
  269.            Halves the current size of the image, with the constraint that
  270.            neither axis is allowed to have a size less than 1 pixel.  Also,
  271.            you may run into 'minimum size' problems with your window
  272.            manager.  See the note in "Section 2.2: Cropping" for more
  273.            information.
  274.  
  275.            Note that the window size is maintained as a pair of integers.
  276.            As a result you may see some integer round-off problems.  For
  277.            example, if you halve a 265x185 image, you'll get a 132x92 image,
  278.            which is just fine.  However, if you Dbl Size this image, you'll
  279.            get a 264x184 image, not the 265x185 image you might have
  280.            expected.
  281.  
  282.       +10%  (Keyboard equivalent '.')
  283.            Increases the current size of the image by 10%, subject to the
  284.            constraint that the image cannot be made larger than the screen
  285.            size (in either axis).  For example, issuing this command on a
  286.            320x200 image will result in a 352x220 image.
  287.  
  288.       -10%  (Keyboard equivalent ',')
  289.            Decreases the current size of the image by 10%.  Neither axis of
  290.            the image is allowed to shrink below 1 pixel.  Also, you run the
  291.            risk of running into 'minimum window size' problems with your
  292.            window manager.
  293.  
  294.            It should be noted that the +10% and -10% commands have no
  295.            concept of an 'original size'.  They simply increase or decrease
  296.            the current image size by 10%.  As a result, they do not undo
  297.            each other.  For example, take a 320x200 image.  Do a +10% and
  298.            the image will be 352x220.  If you issue the -10% command now,
  299.            the image will be made (352 - 35.2)x(220 - 22), or 316x198.
  300.  
  301.       4x3  (Keyboard equivalent '4')
  302.            Attempts to resize the image so that the ratio of width to height
  303.            is equal to 4 to 3.  (e.g., 320x240, 400x300, etc.)  This is
  304.            useful because many images were meant to fill the screen of
  305.            whatever system they were generated on, and nearly all video
  306.  
  307.                                     - 6 -     Formatted:  September 27, 1994
  308.  
  309.            tubes have an aspect ratio of 4:3.  This command will stretch the
  310.            image so that things will probably look right on your X display
  311.            (nearly all of which, thankfully, have square pixels).  This
  312.            command is particularly useful for images which have really
  313.            bizarre sizes (such as the 600x200 images presumably meant for
  314.            CGA, and the 640x350 16-color EGA images).
  315.  
  316.       Aspect  (Keyboard equivalent 'a')
  317.            Applies the 'default aspect ratio' to the image.  This is done
  318.            automatically when the image is first loaded.  Normally, the
  319.            default aspect ratio is '1:1', but certain GIF files may have an
  320.            aspect ratio encoded in them.  You can also set the default
  321.            aspect ratio via a command-line argument or an X resource.  See
  322.            'Section 9: Modifying XV Behavior' for more info.  The idea
  323.            behind this command is that you'd stretch the image manually (via
  324.            your window manager) to roughly the size you'd like, and then use
  325.            the Aspect command to fix up the proportions.
  326.  
  327.            Normally Aspect expands one axis of the image to correct the
  328.            aspect ratio.  If this would result in an image that is larger
  329.            than the screen, the Aspect command will instead shrink one of
  330.            the axes to correct the aspect ratio.
  331.  
  332.     Section 3.2: Rotate/Flip Commands
  333.       Turn CW  (Keyboard equivalent 't')
  334.            Rotates the image 90 degrees clockwise.
  335.  
  336.       Turn CCW  (Keyboard equivalent 'T')
  337.            Rotates the image 90 degrees counter-clockwise.
  338.  
  339.       Flip H  (Keyboard equivalent 'h')
  340.            Flips the image horizontally (around the vertical center-line of
  341.            the image).
  342.  
  343.       Flip V  (Keyboard equivalent 'v')
  344.            Flips the image vertically (around the horizontal center-line of
  345.            the image).
  346.  
  347.     Section 3.3: Smoothing Commands
  348.       Raw  (Keyboard equivalent 'r')
  349.            Returns the displayed image to its 'raw' state (where each pixel
  350.            in the displayed image is as close as possible to the
  351.            corresponding pixel in the internal image).  In short, it turns
  352.            off any dithering or smoothing.  When dithering or smoothing
  353.            haven't been done, this command is disabled.
  354.  
  355.                                     - 7 -     Formatted:  September 27, 1994
  356.  
  357.       Dither  (Keyboard equivalent 'd')
  358.            Regenerates the displayed image by dithering with the available
  359.            colors in an attempt to approximate the original image.  This is
  360.            only relevant if the color allocation code failed to get all the
  361.            colors it wanted.  If it did get all the desired colors, the
  362.            Dither command will just generate the same display image as the
  363.            Raw command.  On the other hand, if you didn't get all the
  364.            desired colors, the Dither command will try to approximate the
  365.            missing colors by dithering with the colors that were obtained.
  366.            If you're running xv on a 1-bit display the Dither command will
  367.            be disabled, as the image will always be dithered for display.
  368.  
  369.       Smooth  (Keyboard equivalent 's')
  370.            Smooths out distortion caused by integer round-off when an image
  371.            is expanded or shrunk.  This is generally a desirable effect,
  372.            however it is fairly time-consuming on large images on most
  373.            current workstations.  As such, by default, it is not done
  374.            automatically.  See "Section 9: Modifying XV Behavior" for more
  375.            details.
  376.  
  377.     Section 3.4: Cropping Commands
  378.       Crop  (Keyboard equivalent 'c')
  379.            Crops the image to the current cropping rectangle.  This command
  380.            is only available when a cropping rectangle has been drawn on the
  381.            image.  See "Section 2.2: Cropping" for further information.
  382.  
  383.       UnCrop  (Keyboard equivalent 'u')
  384.            Returns the image to its normal, uncropped state.  This command
  385.            is only available after the image has been cropped.  See "Section
  386.            2.2: Cropping" for further information.
  387.  
  388.       AutoCrop  (Keyboard equivalent 'A')
  389.            Crops off any constant borders that exist in the image.  It will
  390.            crop to the smallest rectangle that encloses the 'interesting'
  391.            section of the image.  It may not always appear to work because
  392.            of minor invisible color changes in the image.  As such, it works
  393.            best on computer-generated images, and not as well on scanned
  394.            images.
  395.  
  396.     Section 3.5: The Display Modes Menu
  397.       In addition to displaying an image in a window, xv can also display
  398.       images on the root (background) window of your X display.  There are a
  399.       variety of ways that xv can display an image on the root window.  The
  400.       Display Modes popup menu lets you select where (and how) xv will
  401.       display the image.
  402.  
  403.                                     - 8 -     Formatted:  September 27, 1994
  404.  
  405.       Click on the Display Modes button in the xv controls window, and hold
  406.       the mouse button down.  This will cause the Display Modes menu to pop
  407.       up.  The current display mode will be shown with a check mark next to
  408.       it.  To select a new mode, drag the mouse down to the desired mode,
  409.       and release the mouse button.
  410.  
  411.       It is not possible for xv to receive button presses or keyboard
  412.       presses in the root window.  As such, there are several functions that
  413.       cannot be used while in a 'root' mode, such as pixel tracking and
  414.       image cropping.  If you want to do such things, you'll have to
  415.       temporarily return to 'window' mode, and return to 'root' mode when
  416.       you're finished.  Also, when you are in a 'root' mode, you will not be
  417.       able to get rid of the xv controls window.  At best you can iconify it
  418.       (using your window manager).  (The reason for this is that if you ever
  419.       got rid of it there'd be no way to get it back.)
  420.  
  421.       Window
  422.            Displays the image in a window.  If you were previously in a
  423.            'root' mode, the root window will also be cleared.
  424.  
  425.       Root: Tiled
  426.            The image is displayed in the root window.  One image is
  427.            displayed aligned with the top-left corner of the screen.  The
  428.            image is then duplicated towards the bottom and right edges of
  429.            the screen, as many times as necessary to fill the screen.
  430.  
  431.       Root: Integer Tiled
  432.            that the image is first shrunk so that its width and height are
  433.            integer divisors of the screen's width and height.  This keeps
  434.            the images along the bottom and right edges of the screen from
  435.            being Normal, Dbl Size, etc.) will lose the 'integer'-ness of the
  436.            image.
  437.  
  438.       Root: Mirrored
  439.            Tiles the original image with versions that have been
  440.            horizontally flipped, vertically flipped, and both horizontally
  441.            and vertically flipped.  This gets rid of the sharp dividing
  442.            lines where tiled images meet.  The effect is quite interesting.
  443.  
  444.       Root: Integer Mirrored
  445.            Like Root: Mirrored, but also does the integer-ization described
  446.            under the Root: Integer Tiled entry.
  447.  
  448.       Root: Center Tiled
  449.            Like Root: Tiled, but it positions the images so that one of them
  450.  
  451.                                     - 9 -     Formatted:  September 27, 1994
  452.  
  453.            is centered on the screen, and the rest are tiled off in all
  454.            directions.  Visually pleasing without the image size distortion
  455.            associated with Root: Integer Tiled.
  456.  
  457.       Root: Centered
  458.            Displays a single image centered in the root window, surrounded
  459.            by black.
  460.  
  461.       Root: Centered, Warp
  462.            Displays a single image centered in the root window, surrounded
  463.            by a black and white 'warp' pattern, which produces some mildly
  464.            visually pleasing Moire effects.
  465.  
  466.       Root: Centered, Brick
  467.            Displays a single image centered in the root window, surrounded
  468.            by a black and white 'brick' pattern.
  469.  
  470.            Note: The three 'centered' modes (Root: Centered, Root: Centered,
  471.            Warp, and Root: Centered, Brick, but not Root: Center Tiled)
  472.            require the creation of a Pixmap the size of the screen.  This
  473.            can be a fairly large request for resources, and will fail on a
  474.            color X terminal with insufficient memory.  They can also require
  475.            the transmission of considerably more data than the other 'root'
  476.            modes.  If you're on a brain-damaged X terminal hanging off a
  477.            slow network, you should probably go somewhere else.  Barring
  478.            that, you should certainly avoid the 'centered' modes.
  479.  
  480.            Also note: If you quit xv while displaying an image on the root
  481.            window, the image will remain in the root window, and the colors
  482.            used by the image will remain allocated.  This is generally
  483.            regarded as correct behavior.  If you decide you want to get rid
  484.            of the root image to free up resources, or simply because you're
  485.            sick of seeing it, the quickest route is to use run 'xv -clear',
  486.            which will clear the root window, release any allocated colors,
  487.            and exit.  Alternately, xsetroot and any other X program that
  488.            puts things in the root window should be able to do the trick as
  489.            well.
  490.  
  491.     Section 3.6: Working With Multiple Files
  492.       xv provides a a set of controls that let you conveniently operate on a
  493.       list of images.  To use the following commands, you'll have to start
  494.       up xv with a list of filenames.  For example, you could type 'xv
  495.       *.gif' (assuming, of course, that you have a bunch of files that end
  496.       with the suffix '.gif' in the current directory).
  497.  
  498.       The filenames are listed in a scrollable window.  The current
  499.       selection is shown in reverse video.  If there are more names than
  500.  
  501.                                    - 10 -     Formatted:  September 27, 1994
  502.  
  503.       will fit in the window, the scrollbar will be enabled.
  504.  
  505.     Section 3.6.1: Operating a List Window
  506.       The scrollbar operates as follows:
  507.  
  508.       o+  clicking in the top or bottom arrow of the scrollbar scrolls the
  509.          list by one line in the appropriate direction.  It will continue to
  510.          scroll the list as long as you hold the mouse down.
  511.  
  512.       o+  The thumb (the small white rectangle in the middle of the
  513.          scrollbar) shows roughly where in the list you are.  You can change
  514.          your position in the list by clicking and dragging the thumb to
  515.          another position in the scrollbar.
  516.  
  517.       o+  You can scroll the list up or down a page at a time by clicking in
  518.          the grey region between the thumb and the top or bottom arrows.  If
  519.          you click on a name in the list, that name will become highlighted.
  520.          You can drag the highlight bar up and down, and the list will
  521.          scroll appropriately.
  522.  
  523.          It is also possible to control the list window from the keyboard.
  524.          In all cases, you must make sure that the window sees the keypress.
  525.          Generally, this means you have to have the cursor inside the
  526.          window, though your window manager may also require you to click
  527.          inside the window first.
  528.  
  529.       o+  The up and down arrow keys move the highlight bar up and down.  If
  530.          the bar is at the top or bottom of the window, the list will scroll
  531.          one line.
  532.  
  533.       o+  The page up and page down keys scroll the list up or down a page at
  534.          a time.
  535.  
  536.       o+  Pressing the home key will jump to the beginning of the list.
  537.          Pressing the end key will jump to the bottom of the list.
  538.  
  539.     Section 3.6.2: The File Commands
  540.       You can directly view any image in the list by double-clicking on its
  541.       filename.  If xv is unable to load the file (for any of a variety of
  542.       reasons), it'll display an error message and put up the default image,
  543.       the xv logo.
  544.  
  545.       Next  (Keyboard equivalent <space>)
  546.            Attempts to load the next file in the list.  If it is unable to
  547.            load the next file, it will continue down the list until it
  548.            successfully loads a file.  If it gets to the bottom of the list
  549.            without successfully loading a file, it will put up the default
  550.            image.
  551.  
  552.                                    - 11 -     Formatted:  September 27, 1994
  553.  
  554.       Previous  (Keyboard equivalent <backspace>)
  555.            Attempts to load the previous file in the list.  If it is unable
  556.            to load the previous file, it will continue up the list until it
  557.            successfully loads a file.  If it gets to the top of the list
  558.            without successfully loading a file, it will put up the default
  559.            image.
  560.  
  561.       Delete  (Keyboard equivalent <ctrl-D>)
  562.            This command lets delete the currently selected file from the
  563.            list (and optionally delete the associated disk file).  Note that
  564.            the currently selected file is the one with the highlight bar on
  565.            it.  While this is generally the same as the currently displayed
  566.            image, it doesn't have to be.
  567.  
  568.            The Delete command will pop-up a window asking you what you want
  569.            to delete.  Your choices are:
  570.  
  571.            o+  List Entry, which will remove the highlighted name from the
  572.               list.  (Keyboard equivalent: the enter key)
  573.  
  574.            o+  Disk File, which will remove the highlighted name from the
  575.               list and also delete the associated disk file.  This removes
  576.               unwanted images, just like manually typing 'rm <filename>' in
  577.               another window.  (Keyboard equivalent: <ctrl-D>)
  578.  
  579.            o+  Cancel, which lets you get out of the Delete command without
  580.               actually deleting anything.  (Keyboard equivalent: the esc
  581.               key)
  582.  
  583.     Section 3.7: Other Commands
  584.       Info  (Keyboard equivalent 'i')
  585.            Opens and closes the xv info window.  See "Section 4: The Info
  586.            Window" for more details.
  587.  
  588.       ColEdit  (Keyboard equivalent 'e')
  589.            Opens and closes the xv color editor window.  See "Section 5: The
  590.            Color Editor" for more details.
  591.  
  592.       Load  (Keyboard equivalent <ctrl-L>)
  593.            Opens the xv load window.  See "Section 6: The Load Window" for
  594.            more details.
  595.  
  596.       Save  (Keyboard equivalent <ctrl-S>)
  597.            Opens the xv save window.  See "Section 7: The Save Window" for
  598.            more details.
  599.  
  600.                                    - 12 -     Formatted:  September 27, 1994
  601.  
  602.       Quit  (Keyboard equivalent 'q')
  603.            Quits out of the program.
  604.  
  605.  SECTION 4:     THE INFO WINDOW
  606.     Section 4.1: Overview
  607.       xv provides a window to display information about the current image,
  608.       color allocation, expansion, cropping, and any error messages.  This
  609.       window can be opened by issuing the Info command.  (Click on the Info
  610.       button in the xv controls window, or type 'i' in any open xv window.)
  611.       You can close the window by using the Info command while the window is
  612.       open.  You can also close the window by clicking anywhere inside it.
  613.  
  614.       The top portion of the window displays the program name, revision
  615.       date, and patchlevel.  It also shows the University of Pennsylvania
  616.       shield, the GRASP Lab logo, the copyright notice, and of course, the
  617.       author's name.
  618.  
  619.     Section 4.2: The Fields
  620.       The "Filename" field displays the name of the currently loaded file.
  621.       The name is displayed without any leading pathname.  If there is no
  622.       currently loaded image (you're looking at the default image) this
  623.       field will display "<none>".
  624.  
  625.       The "Format" field displays information describing what image format
  626.       the file is stored in, and how large the file is (in bytes).
  627.  
  628.       The "Resolution" field shows the width and height (in image pixels) of
  629.       the loaded image.  Note that this does not necessarily have anything
  630.       to do with the size of the image currently displayed on your screen.
  631.       These numbers do not change as you modify the display image.
  632.  
  633.       The "Cropping" field displays the current state of any cropping
  634.       activity.  If you are looking at the entire (uncropped) image, and
  635.       there is no cropping rectangle drawn, this field will show "<none>".
  636.       If you draw a cropping rectangle, or if you are viewing cropped
  637.       portion of image, this field will display something like "247x128
  638.       rectangle starting at 132,421".  See "Section 2.2: Cropping" for more
  639.       details.
  640.  
  641.       The "Expansion" field gives you information about how the image is
  642.       displayed.  It will display something like "1.58 x 1.37 (505 x 273)".
  643.       This tells you that the current displayed image is 505 pixels wide and
  644.       273 pixels high, and that it is 1.58 times wider and 1.37 times higher
  645.       than the internal image (which, in this case, had a size of 320x200).
  646.  
  647.       The "Colors" field gives you detailed information on how well (or
  648.       poorly) color allocation went.  If everything went reasonably well it
  649.       will display something like:
  650.  
  651.                                    - 13 -     Formatted:  September 27, 1994
  652.  
  653.            Got all 67 desired colors.  (66 unique) This means that 67
  654.            entries in the image's colormap were used in the image, but that
  655.            only 66 of these colors were different, as far as the X server
  656.            was concerned.
  657.  
  658.            See "Appendix E: Color Allocation" for a complete discussion of
  659.            how colors are allocated, and what the "Colors" field can tell
  660.            you.
  661.  
  662.            Note that the fields are filled in as information becomes
  663.            available.  As such, they can be used as a rough 'progress
  664.            indicator' when loading images.  When you begin loading, all the
  665.            fields are cleared.  Once the image has been successfully loaded,
  666.            the top three fields (Filename, Format, Resolution) are filled
  667.            in.  Once the colors have been allocated, and the display image
  668.            generated, the bottom three fields are shown (Cropping,
  669.            Expansion, and Colors).
  670.  
  671.     Section 4.3: Status Lines
  672.       The bottom two lines in the info window display various error
  673.       messages, warnings, and status information.  These two lines are also
  674.       duplicated in the xv controls window.
  675.  
  676.       The upper line is the more commonly used.  It normally displays a
  677.       one-line summary of the current image and color allocation success.
  678.       If an error occurs, it will be displayed on this line as well.
  679.  
  680.       The lower line is used to display warning messages.
  681.  
  682.  SECTION 5:     THE COLOR EDITOR
  683.     Section 5.1: Overview
  684.       The xv color editor provides a powerful system for manipulating color
  685.       images.  Since there are many different reasons why a person would
  686.       want to modify an image's colors, and many different types of images
  687.       that may need modification, there is no one color manipulation tool
  688.       that would be 'best' for all purposes.  Because of this problem, xv
  689.       gives the user three different color tools, all of which can be used
  690.       simultaneously.
  691.  
  692.       o+  Colormap Editing: This tool lets you arbitrarily modify individual
  693.          colormap entries.  Useful for modifying the color of captions or
  694.          other things that have been added to images.  Also works well on
  695.          images that have a small number of colors, such as images generated
  696.          by 'drawing' or CAD programs.  It's also an easy way to spiff up
  697.          boring 1-bit black and white images.
  698.  
  699.       o+  HSV Modification: This tool lets you alter the image globally in
  700.          the HSV colorspace.  (See "Appendix D: RGB and HSV Colorspaces" for
  701.          more info.)  Here are examples of the sort of things you can do
  702.  
  703.                                    - 14 -     Formatted:  September 27, 1994
  704.  
  705.          with this tool:
  706.  
  707.          o+  turn all the blues in an image into reds
  708.  
  709.          o+  change the tint of an image
  710.  
  711.          o+  change a greyscale image into a mauve-scale image
  712.  
  713.          o+  increase or decrease the amount of color saturation in an image
  714.  
  715.          o+  change the overall brightness of an image
  716.  
  717.          o+  change the overall contrast of an image
  718.  
  719.       o+  RGB Modification: This tool lets you route the red, green, and blue
  720.          color components of an image through independent mapping functions.
  721.          The functions can either be the standard gamma function, or any
  722.          arbitrary function that can be drawn with straight line segments or
  723.          a cubic spline.  See "Section 5.3.4: The Intensity Graph" for more
  724.          info about graph functions.  The major use of the RGB Modification
  725.          tool is to correct for the differing color response curves of
  726.          various color monitors, printers, and scanners.  This is the tool
  727.          to use when "the image is too red", for instance.
  728.  
  729.          These three tools are tied together in a fixed order.  The Colormap
  730.          Editing tool operates on the original colors in the image.  The
  731.          output of this tool is piped into the HSV Modification tool.  Its
  732.          output is piped into the RGB Modification tool.  The output from
  733.          the RGB Modification tool is what actually gets displayed.
  734.  
  735.          In addition there is a collection of buttons that control the xv
  736.          color editor as a whole (more or less).
  737.  
  738.          Don't Panic!  It's not as complicated as it looks.
  739.  
  740.     Section 5.2: The Colormap Editing Tool
  741.       The top portion of this window shows the colormap of the current
  742.       image.  There are 16 cells across, and up to 16 rows down, for a
  743.       maximum of 256 color cells.  Only cells actually used somewhere in the
  744.       image are shown in this array.
  745.  
  746.       The currently selected color cell is shown with a thick border.  You
  747.       can change the selection by clicking anywhere in the array.  If you
  748.       drag the mouse through this area, you'll see the dials at the bottom
  749.       change to track the current pixel values.
  750.  
  751.       You can also select a color cell by clicking anywhere in the image
  752.       window.  Whichever pixel value you were on when you let go of the
  753.       mouse will become the new selected color cell.
  754.  
  755.                                    - 15 -     Formatted:  September 27, 1994
  756.  
  757.       Since certain images will have many colors that are the same, or
  758.       nearly the same, it is sometimes convenient to group color cells
  759.       together.  Grouped color cells all take on the same color, and
  760.       changing any one of them affects all of the other colors in the group.
  761.  
  762.       To group color cells together, do the following:
  763.  
  764.       o+  Hold down the <shift> key.
  765.  
  766.       o+  Left click on one color cell that you would like to be in the group
  767.  
  768.       o+  Right click on other color cells that you wish to be in this group.
  769.          (Right clicking on cells that are already selected will de-select
  770.          them.)
  771.  
  772.       o+  Release the <shift> key when you're done.  You can create as many
  773.          groups as you like.
  774.  
  775.          You can use this grouping/ungrouping technique to copy colors from
  776.          one color cell to another.  Left click on the source color cell,
  777.          Right click on the destination color cell, and Right click on the
  778.          destination color cell again (to ungroup it).
  779.  
  780.     Section 5.2.1: Using the Dial Controls
  781.       At the bottom the Colormap Editing tool are three dials that let you
  782.       set the color of the current color cell (or group of cells).  By
  783.       default, the dials control the Red, Green, and Blue components of the
  784.       RGB colorspace, but they can also control the Hue, Saturation, and
  785.       Value components of the HSV colorspace.  (The RGB/HSV button controls
  786.       this.)
  787.  
  788.       Regardless of what they control, all dials in xv work the same way.
  789.       Clicking on the single arrows increase/decrease the value by 1.
  790.       Clicking on the double arrows increase/decrease the value by a larger
  791.       amount (16 in this case).  If you click on one of the arrows, and hold
  792.       the mouse button down, the increase/decrease will repeat until you
  793.       release the mouse button.
  794.  
  795.       You can also click in the general area of the pointer and simply drag
  796.       it to the position you want.  The further your mouse cursor is from
  797.       the center of the dial, the more precise the control will be.  While
  798.       dragging, you do not have to keep the cursor inside the dial window.
  799.  
  800.     Section 5.2.2: Colormap Editing Commands
  801.       ColUndo
  802.            Undoes the last change made to the colormap that resulted in a
  803.            color cell changing value.  This includes grouping and ungrouping
  804.            color cells, and changing any of the dials.
  805.  
  806.                                    - 16 -     Formatted:  September 27, 1994
  807.  
  808.       Revert
  809.            Undoes all color changes.  Returns the colormap to its original
  810.            state.  Destroys any groups that you may have created.
  811.  
  812.       RGB/HSV
  813.            Toggles the Colormap Editing dials between editing colors in
  814.            terms of Red, Green, and Blue, and editing colors in terms of
  815.            Hue, Saturation, and Value.
  816.  
  817.       Grey Turns color images into greyscale images by changing the
  818.            colormap.  This replaces each color cell with a greyscale
  819.            representation of itself.  Use the Revert command to restore the
  820.            colors.
  821.  
  822.       RevVid
  823.            This command behaves differently, depending on the setting of the
  824.            RGB/HSV mode.  (You can tell which mode you're in by the titles
  825.            on the dials.)
  826.  
  827.            In RGB mode, each color component is separately 'inverted'.  For
  828.            example, Yellow (which is composed of full red, full green, and
  829.            no blue) would turn to Blue (no red, no green, full blue).
  830.  
  831.            In HSV mode, only the Value (intensity) component is 'inverted'.
  832.            The Hue and Saturation components remain the same.  In this mode,
  833.            bright colors turn to dark versions of the same color.  For
  834.            example, a Yellow would turn Brown.
  835.  
  836.       Random
  837.            Generates a random colormap.  This is of questionable usefulness,
  838.            but it will occasionally come up with pleasing color combinations
  839.            that you never would've come up with yourself.  So it stays in.
  840.            It works best on images with a small number of colors.  Note that
  841.            it respects cell groupings, so if your image has a lot of colors,
  842.            you can create a few large groups and then use the Random
  843.            command.
  844.  
  845.            Note: It is HIGHLY RECOMMENDED that if you're using the Colormap
  846.            Editing tool, you do NOT use the HSV Modification tool or the RGB
  847.            Modification tool as well.  If you do, the results can be quite
  848.            confusing.  For example, you might edit a color cell, and set its
  849.            color values to produce a purple.  However, because of HSV/RGB
  850.            Modification further down the line, the actual color displayed on
  851.            the image (and in the color cell) is yellow.  Very confusing,
  852.            indeed.
  853.  
  854.                                    - 17 -     Formatted:  September 27, 1994
  855.  
  856.     Section 5.3: The HSV Modification Tool
  857.       There are four separate controls in the HSV Modification tool.  At the
  858.       top of the window are a pair of circular controls that handle hue
  859.       remapping.  Lower down is a circular control that maps 'white' (and
  860.       greys) to a specified color.  There is a dial control that lets you
  861.       saturate/desaturate the colors of the current information.  Finally,
  862.       at the bottom there is a graph window that lets you modify intensity
  863.       values via an arbitrary remapping function.
  864.  
  865.     Section 5.3.1: Hue Remapping Controls
  866.       These two dials are used to define a source and a destination range of
  867.       hue values.  Every hue in the source range (defined in the From dial)
  868.       gets mapped to the value of the corresponding point in the destination
  869.       range (defined in the To dial).
  870.  
  871.       Each dial has a pair of radial lines with handles at their ends.
  872.       Between the two lines an arc is drawn with an arrow at one end.  The
  873.       wedge drawn by these lines and the arc defines a range of values (in
  874.       degrees).  The direction of the arc (clockwise, or counter-clockwise)
  875.       determines the direction of this range of values (increasing or
  876.       decreasing).
  877.  
  878.       Distributed around the dial are tick marks and the letters 'R', 'Y',
  879.       'G', 'C', 'B', and 'M'.  These letters stand for the colors Red,
  880.       Yellow, Green, Cyan, Blue, and Magenta, and they show where these
  881.       colors appear on the circle.
  882.  
  883.       The range is shown numerically below the control.  By default the
  884.       range is '330, 30 CW'.  This means that a range of values [330, 331,
  885.       332, ... 359, 0, 1, ... 28, 29, 30] has been defined.  Note that
  886.       (being a circle) it wraps back to 0 after 359.
  887.  
  888.       The range can be changed in many different ways.  You can click on the
  889.       'handles' at the end of the radial lines and move them around.  If you
  890.       click inside the dial, but not on one of the handles, you'll be able
  891.       to drag the range around as a single object.  There are also 5 buttons
  892.       below the dial that let you rotate the range, flip the direction of
  893.       the range, and increase/decrease the size of the range while keeping
  894.       it centered around the same value.
  895.  
  896.       In its default state, the To dial is set to the same range as the From
  897.       dial.  When the two dials are set to the same range, they are
  898.       effectively 'turned off', and ignored.
  899.  
  900.       An example of hue remapping:
  901.  
  902.       o+  As a simple example of the sort of things you can do with the hue
  903.          remapping control, we'll change the background color of the default
  904.          (xv logo) image without changing any other colors in the image.
  905.          Since the background is composed of a gradient of 64 colors, you
  906.  
  907.                                    - 18 -     Formatted:  September 27, 1994
  908.  
  909.          would not want to do this with the Colormap Editing tool.  It would
  910.          take forever.
  911.  
  912.       o+  First, get the default image up on the screen by running 'xv'
  913.          without giving any filenames.  Open up the xv color editor window
  914.          via the ColEdit command.
  915.  
  916.       o+  Next, click the mouse in the image window and drag it around.
  917.          You'll see that all the background pixels have the same Hue
  918.          component value (240).
  919.  
  920.       o+  To remap this hue, simply adjust the From dial so that its range
  921.          includes this Hue value.  The background should change from 'blue'
  922.          to a reddish color, assuming the To dial is still set to its
  923.          default range (centered around 'R').  If more than the background
  924.          changed color, you can shrink the From range so that it covers
  925.          fewer colors.  In fact, it's possible to shrink the range to the
  926.          point where it only covers only a single value.  Note that the
  927.          values printed when you are tracking pixel values in the image are
  928.          the values before the HSV Modification tool is applied.  For
  929.          example, the background of the default image will still claim to be
  930.          blue, regardless of what color you may have changed it to.  This is
  931.          so that you know what Hue value you will need to remap if you want
  932.          to change its color again.
  933.  
  934.          If you press the Reset button that is located near the hue
  935.          remapping controls, it will effectively disable the hue remapping
  936.          by setting the To range equal to the From range.
  937.  
  938.          Below the hue remapping controls are a group of 'radio buttons'.
  939.          You can have up to six different hue remappings happening
  940.          simultaneously.  Higher numbered mappings take precedence over
  941.          lower number mappings.
  942.  
  943.          An example of multiple hue remappings:
  944.  
  945.       o+  Draw a From range that is a complete circle.  The easiest way to do
  946.          this is to draw a range that is nearly a full circle, then click
  947.          and hold down the 'increase range' button located below the From
  948.          range dial until the range stops getting bigger.
  949.  
  950.       o+  Copy this range to the To range by pressing the Reset button.
  951.  
  952.       o+  Rotate the To range slightly, by either clicking and dragging
  953.          anywhere in the To range dial, or by using the 'rotate clockwise'
  954.          and 'rotate counter-clockwise' buttons located below the To range.
  955.  
  956.       o+  You've just built yourself what is effectively a tint control.
  957.  
  958.       o+  Now, suppose, you'd like to adjust the background color of your
  959.          (tint-modified) image, without affecting anything else.  Clicking
  960.  
  961.                                    - 19 -     Formatted:  September 27, 1994
  962.  
  963.          on the background in the image window reveals that the background
  964.          still has an (original) hue of 240.  To modify this hue without
  965.          affecting anything else, we'll need a second hue remapping.
  966.  
  967.       o+  Click on the 2 radio button.  The dials will change to some other
  968.          default setting.  As before, set the From range to encompass the
  969.          value 240, preferably as 'tightly' as possible, and set the To
  970.          range to produce the desired background color.  Note that the six
  971.          hue remappings are not 'cascaded'.  The output of one remapping is
  972.          not fed as input into any of the other hue remappings.  The hue
  973.          remappings always operate on the hue values in the original image.
  974.          In this example, if remapping #1 adds 32 to all hue values, thereby
  975.          mapping the blue background (value 240) into a purple-blue (value
  976.          272), remapping #2 still sees the background at 240, and can remap
  977.          it to anything it likes.  Similarly, in the same example, if
  978.          remapping #1 has mapped a green-blue color (value 208) into blue
  979.          (value 240), remapping #2 will not map this into another color.  As
  980.          far as remapping #2 is concerned, that green-blue is still green-
  981.          blue.
  982.  
  983.          If it seems complicated, I'm sorry.  It is.
  984.  
  985.     Section 5.3.2: The White Remapping Control
  986.       In the HSV colorspace, 'white' (including black, and all the greys in
  987.       between) has no Hue or Saturation components.  As such, it is not
  988.       possible to use the hue remapping controls to change the color of
  989.       white pixels in the image, since they have no 'color' to change.
  990.  
  991.       The white remapping control provides a way to add Hue and Saturation
  992.       components to all the whites in the image.  It consists of a movable
  993.       point in a color dial.  The angle of the dot from the center of the
  994.       dial determines the Hue component.  The distance of the dot from the
  995.       center of the dial determines the Saturation component.  The further
  996.       the dot is from the center of the dial, the more saturated the color
  997.       will be.
  998.  
  999.       You can control the white remapping control in several ways.  You can
  1000.       click on the handle and drag it around with the mouse.  There are also
  1001.       four buttons provided under the dial.  One pair allows you to rotate
  1002.       the handle clockwise and counter-clockwise without changing its
  1003.       distance from the center.  The other pair of buttons lets you change
  1004.       the distance between the handle and the center without changing the
  1005.       angle.
  1006.  
  1007.       The current Hue and Saturation values provided by the control is
  1008.       displayed below the dial.  The first number is the Hue component, in
  1009.       degrees, and the second is the Saturation component, as a percentage.
  1010.  
  1011.       There is also a checkbox that will let you turn off the white
  1012.       remapping control.  This lets you quickly compare your modified
  1013.  
  1014.                                    - 20 -     Formatted:  September 27, 1994
  1015.  
  1016.       'white' with the original white.  You can also effectively disable the
  1017.       white remapping control by putting the handle back in the center of
  1018.       the control.  The easiest way to do this is to click and hold the
  1019.       'move towards center' button until the saturation gets down to 0%.
  1020.  
  1021.       Example:
  1022.  
  1023.       o+  Press the Grey control in the Colormap Editing tool.  This turns
  1024.          all the colors in the image into shades of grey.
  1025.  
  1026.       o+  Drag the handle in the white remapping control halfway down towards
  1027.          the 'R' mark.  The Hue and Saturation values should be roughly 0-
  1028.          degrees and 50%.  The image should now be displayed in shades of
  1029.          pink.
  1030.  
  1031.     Section 5.3.3: The Saturation Control
  1032.       The saturation control lets you globally increase or decrease the
  1033.       color saturation of the image.  In effect, it is much like the 'color'
  1034.       control on most color televisions.
  1035.  
  1036.       The saturation control is a dial that operates exactly like the dials
  1037.       described in "Section 5.2.1 Using the Dial Controls".  In short, you
  1038.       can click and hold down any of the four buttons in the bottom of the
  1039.       control to increase or decrease the control's value.  You can also
  1040.       click on the dial itself and move the pointer around directly.
  1041.  
  1042.       The saturation control has values that range from '-100%' to '+100%'.
  1043.       At its default setting of '0%', the saturation control has no effect
  1044.       on the image.  As the values increase, the colors become more
  1045.       saturated, up to '+100%' where every color is fully saturated.
  1046.       Likewise, as values decrease, the colors become desaturated.  At '-
  1047.       100%', every color will become a completely desaturated (i.e., a shade
  1048.       of grey).  Note that this control is applied after the the White
  1049.       Remapping control, so if you 'greyify' the image by completely
  1050.       desaturating it, you will not be able to color it using the White
  1051.       Remapping control.
  1052.  
  1053.       Unless you're trying for some special effects, the useful range of
  1054.       this control is probably '+/-20%'.  Also note that the control will
  1055.       have no effect on shades of grey, as they have no color to saturate.
  1056.  
  1057.     Section 5.3.4: The Intensity Graph
  1058.       The intensity graph allows you to change the brightness of the image,
  1059.       change the contrast of the image, and get some unique effects.
  1060.  
  1061.       The intensity graph is a function that lets you remap intensity values
  1062.       (the Value component in HSV Colorspace) into other intensity values.
  1063.       The input and output values of this function both range from 0 to 255.
  1064.       The input values range along the x axis of this graph (the
  1065.  
  1066.                                    - 21 -     Formatted:  September 27, 1994
  1067.  
  1068.       horizontal).  For every input value (point along the x axis) there is
  1069.       a unique output value determined by the height of the graph at that
  1070.       point.  In the graph's default state, the function is a straight line
  1071.       from bottom-left to top-right.  In this case, each input value
  1072.       produces an equivalent output value, and the graph has no effect.
  1073.  
  1074.       There are a number of 'handles' along the graph.  These provide your
  1075.       major means of interacting with the graph.  You can move them around
  1076.       arbitrarily, subject to these two constraints: the handles at the far
  1077.       left and far right of the graph can only be moved vertically, and
  1078.       handles must remain between their neighboring handles for the graph to
  1079.       remain a proper function.
  1080.  
  1081.       The handles are normally connected by a spline curve.  To see this,
  1082.       move one of the handles by clicking and dragging it.  The function
  1083.       will remain a smoothly curved line that passes through all the
  1084.       handles.  You can change this behavior by putting the function into
  1085.       'lines' mode.  Press the 'lines' button (the second button down from
  1086.       the top).  The function will change to a series of line segments that
  1087.       connect the handles.  Press the 'spline' button (the top button) to go
  1088.       back to 'spline' mode.
  1089.  
  1090.       The next two buttons let you add or delete handles.  The 'add handle'
  1091.       button will insert a handle into the largest 'gap' in the function.
  1092.       The 'delete handle' button will remove a handle from the smallest
  1093.       'gap' in the function.  You can have as little as 2 handles, or as
  1094.       many as 16.  Note that as the number of handles gets large, the spline
  1095.       will start getting out of control.  You may wish to switch to 'lines'
  1096.       mode in this case.
  1097.  
  1098.       The 'Reset' button puts everything back on a straight line connecting
  1099.       bottom-left to top-right (a 1:1 function).  It does not change the
  1100.       number of handles, nor does it change the x-positions of the handles.
  1101.  
  1102.       The 'Gam' button lets you set the function curve by entering a single
  1103.       number.  The function is set equal to the gamma function:
  1104.  
  1105.            Y = 255 * (I/255) ^ (1/g) where I is the input value (0-255), g
  1106.            is the gamma value, and Y is the computed result.
  1107.  
  1108.            Gamma values (for our purposes) can range between 0 and 10000,
  1109.            non-inclusive.
  1110.  
  1111.       o+  A gamma value of '1.00' results in the normal 1:1 straight line.
  1112.  
  1113.       o+  Gamma values of less than 1.00 but greater than 0.00 result in
  1114.          'exponential' curves, which will dim the image.
  1115.  
  1116.       o+  Gamma values greater than 1.00 result in 'logarithmic' curves,
  1117.          which will brighten the image.  Try it and see.  There is a
  1118.          shortcut for the 'Gam' button.  Type 'g' while the mouse is inside
  1119.  
  1120.                                    - 22 -     Formatted:  September 27, 1994
  1121.  
  1122.          the graph window.
  1123.  
  1124.          Also, touching any of the handles after a 'Gam' command will put
  1125.          the graph back into its 'normal' mode.  (Either 'spline' or 'lines'
  1126.          depending on which of the top two buttons is turned on.)
  1127.  
  1128.          Generally, whenever you move a graph handle and let go of it, the
  1129.          image will be redrawn to show you the effects of what you've done.
  1130.          This can be time-consuming if you intend to move many points
  1131.          around.  You can temporarily prevent the redisplay of the image by
  1132.          holding down a <shift> key.  Continue to hold the <shift> key down
  1133.          while you move the handles to the new position.  Release the
  1134.          <shift> key when you're done, and the image will be redisplayed.
  1135.  
  1136.     Section 5.4: The RGB Modification Tool
  1137.       The RGB Modification tool is a collection of three graph windows, each
  1138.       of which operate on one of the components of the RGB colorspace.  This
  1139.       tool lets you perform global color-correction on the image by boosting
  1140.       or cutting the values of one or more of the RGB color components.  You
  1141.       can use this to correct for color screens that are 'too blue', or for
  1142.       color printers that produce 'brownish' output, or whatever.
  1143.  
  1144.       The graphs work exactly as explained in "Section 5.3.4:  The Intensity
  1145.       Graph".
  1146.  
  1147.       Neat Trick: In addition to color-correction, you can use the RGB
  1148.       modification tool to add color to images that didn't have color to
  1149.       begin with.  For instance, you can 'pseudo-color' a greyscale image.
  1150.  
  1151.       An example of pseudo-coloring:
  1152.  
  1153.       o+  Adjust the Red graph so that there is a strong red presence on the
  1154.          right side of the graph, and none on the left, or in the middle.
  1155.  
  1156.       o+  Adjust the Green graph so that there is a strong green presence in
  1157.          the middle of the graph, and none on the left or right.
  1158.  
  1159.       o+  Adjust the Blue graph so that there is a strong blue presence on
  1160.          the left side of the graph, and none on the left, or in the middle.
  1161.          You now have a transformation that will take greyscale images and
  1162.          display them in pseudo-color, using a 'temperature' color scheme.
  1163.          Neato!
  1164.  
  1165.     Section 5.5: The Color Editor Controls
  1166.       These buttons provide general control over the whole xv color editor
  1167.       window.  You can display the image with or without color modification,
  1168.       save and recall presets, and undo/redo changes.  Also, convenience
  1169.       controls are given for performing some of the most common operations
  1170.       on the Intensity graph.
  1171.  
  1172.                                    - 23 -     Formatted:  September 27, 1994
  1173.  
  1174.       Apply  (Keyboard equivalent 'p')
  1175.            Displays the image using the current HSV and RGB Modifications.
  1176.            Also turns the 'Display with HSV/RGB mods' checkbox on.  (See
  1177.            below.)
  1178.  
  1179.            This is only useful when the 'Auto-apply HSV/RGB mods' checkbox
  1180.            is off.
  1181.  
  1182.       NoMod
  1183.            Displays the image without any HSV or RGB Modifications.  Also
  1184.            turns the 'Display with HSV/RGB mods' checkbox off.
  1185.  
  1186.       Reset  (Keyboard equivalent 'R')
  1187.            Resets all HSV and RGB controls to their default settings.
  1188.            Doesn't affect the Colormap Editing tool.
  1189.  
  1190.       Undo Undoes the last change to the HSV or RGB controls.
  1191.  
  1192.            It may be helpful to think of xv as maintaining a series of 32
  1193.            'snapshots' of the HSV and RGB controls.  You are normally
  1194.            looking at the last frame in this series.  The Undo control moves
  1195.            you backwards in the series.
  1196.  
  1197.       Redo Only available after you've hit Undo.  Moves you forward in the
  1198.            'snapshot' series described above.  Note that if you have hit
  1199.            Undo a few times (i.e., you're now looking at some frame in the
  1200.            middle of the series), and you change an HSV or RGB control, all
  1201.            subsequent frames in the series are thrown away, and the current
  1202.            state becomes that last frame in the series.
  1203.  
  1204.       1,2,3,4
  1205.            Pressing any of these buttons recalls a preset (a complete set of
  1206.            values for the HSV and RGB controls).
  1207.  
  1208.       Set  Used in conjunction with the 1,2,3,4 buttons to store the current
  1209.            settings of the HSV and RGB controls into a preset.  To do so,
  1210.            press the Set button, and then press one of the 1,2,3,4 buttons.
  1211.            The current HSV and RGB control settings will be stored in that
  1212.            preset, as long as xv continues running.  The values will be lost
  1213.            when the program exits.  It is also possible to save these values
  1214.            permanently.  See the Cut Resources button (below) and "Section
  1215.            9: Modifying XV Behavior" for more details.
  1216.  
  1217.                                    - 24 -     Formatted:  September 27, 1994
  1218.  
  1219.       Cut Resources
  1220.            Copies the current settings of the HSV and RGB controls, as text,
  1221.            into the X server's cut buffer.  You can then use a text editor
  1222.            to paste these values into your '.Xdefaults' (or '.Xresources')
  1223.            file.  This lets you save the current settings 'permanently'.
  1224.            See "Section 9: Modifying XV Behavior" for more details.
  1225.  
  1226.       Close
  1227.            This button closes the xv color editor window.
  1228.  
  1229.       Brite
  1230.            Brightens the image by moving all the handles in the Intensity
  1231.            graph up by a constant amount.
  1232.  
  1233.       Dim  Darkens the image by moving all the handles in the Intensity
  1234.            graph down by a constant amount.
  1235.  
  1236.       Sharp
  1237.            Increases the contrast of the image by moving handles on the left
  1238.            side of the Intensity graph down, and handles on the right side
  1239.            up.
  1240.  
  1241.       Dull Decreases the contrast of the image by moving handles on the left
  1242.            side of the Intensity graph up, and handles on the right side
  1243.            down.
  1244.  
  1245.       MaxCn  (Keyboard equivalent 'C')
  1246.            Automatically maximizes the contrast of an image by finding the
  1247.            second-brightest and second-darkest colors in the image, making
  1248.            those full-bright and full-dark respectively, effectively
  1249.            expanding the dynamic range of the image.  All in-between colors
  1250.            are remapped accordingly.  The image must have at least four
  1251.            colors for this control to have any effect.  The 'Display with
  1252.            HSV/RGB mods' checkbox tells you whether or you're looking at a
  1253.            modified image (checked) or the 'raw', unmodified image
  1254.            (unchecked).  The Apply and NoMod buttons change the setting of
  1255.            this checkbox, and you can also change the checkbox directly by
  1256.            clicking on it.
  1257.  
  1258.            The 'Auto-apply HSV/RGB mods' checkbox controls whether or not
  1259.            the program regenerates and redisplays the image after each
  1260.            change to an HSV or RGB control.  By default, this checkbox is
  1261.            turned on, so that you can easily see the results of your
  1262.            modifications.  However, in the case that you want to make a
  1263.            large number of changes at once, it might be preferable to turn
  1264.  
  1265.                                    - 25 -     Formatted:  September 27, 1994
  1266.  
  1267.            automatic redisplay off for a while, to speed things up.
  1268.  
  1269.            The 'Auto-reset on new image' checkbox controls whether or not
  1270.            the HSV and RGB controls are Reset back to their default values
  1271.            whenever a new image is loaded up.  By default, this is also
  1272.            turned on, as when you're playing with the HSV/RGB controls, you
  1273.            probably only want to affect the current image, and not all
  1274.            subsequently loaded images as well.
  1275.  
  1276.  SECTION 6: THE LOAD WINDOW
  1277.       The xv load window lets you load and view images interactively,
  1278.       without specifying them on the command line when you start xv.
  1279.  
  1280.       The load window shows the contents of the current directory in a
  1281.       scrolling window.  The files will be sorted alphabetically, with all
  1282.       the directories (and symbolic links to directories, if your operating
  1283.       system supports them) displayed first.
  1284.  
  1285.       This list window operates in the same way that the one in the xv
  1286.       controls window works.  (See "Section 3.6.1: Operating a List Window"
  1287.       for details.)  In short, you can operate the scroll bar, drag the
  1288.       highlight bar around the window, and use the up-arrow, down-arrow,
  1289.       Home, End, Page Up, and Page Down keys on your keyboard.
  1290.  
  1291.       Whenever you click on a name in the list (or otherwise change the
  1292.       position of the highlight bar), the name of the highlighted file is
  1293.       copied to the "Load file" text entry region, located below the list
  1294.       window.  Pressing the Ok button (or typing <return>) will cause the
  1295.       program to attempt to load the specified file.  If the load attempt is
  1296.       successful, the load window will disappear, and the new image will be
  1297.       displayed.  Otherwise, an error message will be displayed, and the
  1298.       load window will remain visible.
  1299.  
  1300.       If the image is successfully loaded, its name will be added to the xv
  1301.       controls window list.  This will let you quickly reload it later
  1302.       without have to go through the xv load window again.
  1303.  
  1304.       You can also load a file by double-clicking on its name in the file
  1305.       list.
  1306.  
  1307.       If the specified file is a directory, xv will figure that out and
  1308.       (instead of loading it) will 'cd' to that directory, and display its
  1309.       contents in the list window.
  1310.  
  1311.       Above the list window is a pop-up menu button, much like the Display
  1312.       Modes button in the xv controls window.  It normally displays the name
  1313.       of the current directory.  If you click this button, and hold the
  1314.       mouse down, the complete path will be shown, one directory per line.
  1315.       You can go 'up' the directory tree any number of levels, all the way
  1316.       up to the root directory, by simply selecting a directory name in this
  1317.  
  1318.                                    - 26 -     Formatted:  September 27, 1994
  1319.  
  1320.       list.
  1321.  
  1322.       For those who prefer the direct approach, you can simply type file or
  1323.       directory names in the "Load file" text entry region.  If you type a
  1324.       directory name and hit <return>, xv will 'cd' to that directory and
  1325.       display its contents in the list window.  If you type a file name and
  1326.       hit <return>, xv will attempt to load the file.  You can enter
  1327.       relative paths (relative to the currently displayed directory),
  1328.       absolute paths, and even paths that begin with a '~'.
  1329.  
  1330.       The "Load file" text entry region supports a number of emacs-like
  1331.       editing keys.
  1332.  
  1333.            Ctrl-F    moves the cursor forward one character
  1334.  
  1335.            Ctrl-B    moves the cursor backward one character
  1336.  
  1337.            Ctrl-A    moves the cursor to the beginning of the line
  1338.  
  1339.            Ctrl-E    moves the cursor to the end of the line
  1340.  
  1341.            Ctrl-D    deletes the character to the right of the cursor
  1342.  
  1343.            Ctrl-U    clears the entire line
  1344.  
  1345.            Ctrl-K    clears from the cursor position to the end of the line.
  1346.            If the filename is so long that it cannot be completely displayed
  1347.            in the text entry region, a thick line will appear on the left or
  1348.            right side (or both sides) of the region to show that "there's
  1349.            more over this way".
  1350.  
  1351.  SECTION 7: THE SAVE WINDOW
  1352.       The xv save window lets you write images back to disk, presumably
  1353.       after you've modified them.  You can write images back many different
  1354.       formats, not just the original format.
  1355.  
  1356.       For the most part, the xv save window operates exactly like the xv
  1357.       load window.  (See "Section 6: The Load Window" for details.)  Only
  1358.       the differences are listed here.
  1359.  
  1360.       When the window is opened, it should have the filename of the
  1361.       currently loaded file already entered into the text entry region.  If
  1362.       you change directories, or click on a file name in the list window,
  1363.       this name will be cleared and replaced with the new name.
  1364.  
  1365.       At the bottom of the window are a list of possible formats in which
  1366.       you can save the file.  If you click on one of these formats, and your
  1367.       filename has a recognized suffix (i.e., '.gif', '.GIF', '.pbm', etc.),
  1368.       the suffix portion of your filename will be replaced with the new,
  1369.       appropriate suffix for the selected format.
  1370.  
  1371.                                    - 27 -     Formatted:  September 27, 1994
  1372.  
  1373.       You can pipe output from xv to other programs by using the xv save
  1374.       window.  A fine use for this feature is directly printing images to a
  1375.       PostScript printer by selecting 'PostScript' in the formats list, and
  1376.       typing something like "| lpr" as the filename.  In this case, xv will
  1377.       create a temporary file, write the PostScript to that file, and cat
  1378.       the contents of that file to the entered command.  XV will wait for
  1379.       the command to complete.  If the command completed successfully, the
  1380.       xv save window will disappear.  If the command was unsuccessful, the
  1381.       window will remain visible.  In any event, the temporary file will be
  1382.       deleted.
  1383.  
  1384.       At the bottom right side of the window there is a list of possible
  1385.       'Color' variations to save.  Most file formats support different
  1386.       'sub-formats' for 24-bit color, 8-bit greyscale, 1-bit B/W stippled,
  1387.       etc.  Not all of them do.  Likewise, not all 'Color' choices are
  1388.       available in all formats.
  1389.  
  1390.       In general, the 'Color' choices do the following:
  1391.  
  1392.       Full Color
  1393.            Saves the image as currently shown with all color modifications,
  1394.            cropping, rotation, flipping, resizing, and smoothing.  The image
  1395.            will be saved with all of its colors, even if you weren't able to
  1396.            display them all on your screen.  For example, you can load a
  1397.            color image on a 1-bit B/W display, modify it, and write it back.
  1398.            The saved image will still be full color, even though all you
  1399.            could see on your screen was some B/W-dithered nightmare.
  1400.  
  1401.       Greyscale
  1402.            Like Full Color, but saves the image in a greyscale format.
  1403.  
  1404.       B/W Dithered
  1405.            Like Full Color, but before saving the image xv generates a 1-
  1406.            bit-per-pixel, black-and-white dithered version of the image, and
  1407.            saves that, instead.
  1408.  
  1409.       Reduced Color
  1410.            Saves the image as currently shown, with all color modifications,
  1411.            cropping, rotation, flipping, resizing, and smoothing.  The image
  1412.            will be saved as shown on the screen, with as many or few colors
  1413.            as xv was able to use on the display.  The major purpose of this
  1414.            is to allow special effects (color reduction) to be saved, in
  1415.            conjunction with the '-ncols' command line option.  You will
  1416.            probably never need to use this.  Format notes:
  1417.  
  1418.                                    - 28 -     Formatted:  September 27, 1994
  1419.  
  1420.       GIF  While xv can read both the GIF87a and GIF89a formats, it will
  1421.            only write GIF87a.  This is in keeping with the GIF89
  1422.            specification, which states that if you don't need any of the
  1423.            features added in GIF89 (which xv doesn't), you should continue
  1424.            to write GIF87, for greater compatibility with old GIF87-only
  1425.            readers.
  1426.  
  1427.            Since GIF only supports one format (up to 8 bits per pixel, with
  1428.            a colormap), there will be no size difference between a Full
  1429.            Color and a Greyscale image.  A B/W Dithered image, on the other
  1430.            hand, will be considerably smaller.
  1431.  
  1432.       PM   Full Color images are saved in the 3-plane, 1-band, PM_C format.
  1433.            Greyscale and B/W Dithered images are both saved in the 1-plane,
  1434.            1-band, PM_C format.  As such, there is no size advantage to
  1435.            saving in the B/W Dithered format.
  1436.  
  1437.       PBM (raw)
  1438.            Full Color images are saved in PPM format.  Greyscale images are
  1439.            saved in PGM format.  B/W Dithered images are saved in PBM
  1440.            format.  Each of these formats are tailored to the data that they
  1441.            save, so PPM images are larger than PGM images, which are in turn
  1442.            larger than PBM images.
  1443.  
  1444.            In the raw variation of the PBM formats, the header information
  1445.            is written in plain ASCII text, and the image data is written as
  1446.            binary data.  This is the more popular of the two dialects of
  1447.            PBM.
  1448.  
  1449.       PBM (ascii)
  1450.            Like PBM (raw), only the image data is written as ASCII text.  As
  1451.            such, images written in this format will be several times larger
  1452.            than images written in PBM (raw).  This is a pretty good format
  1453.            for interchange between systems because it is easy to parse.
  1454.            Also, since they are pure, printable ASCII text, images saved in
  1455.            this format can be mailed, without going through a uuencode-like
  1456.            program.
  1457.  
  1458.            Note that xv-produced PBM files may break some PBM readers that
  1459.            do not correctly parse comments.  If your PBM reader cannot parse
  1460.            comments, you can easily edit the PBM file and remove the comment
  1461.            lines.  A comment is everything from a "#" character to the end
  1462.            of the line.
  1463.  
  1464.       X11 Bitmap
  1465.            Saves files in the format used by the bitmap program, which is
  1466.            part of the standard X11 distribution.  Since bitmap files are
  1467.  
  1468.                                    - 29 -     Formatted:  September 27, 1994
  1469.  
  1470.            inherently 1-bit per pixel, you can only select the B/W Dithered
  1471.            option for this format.
  1472.  
  1473.       Sun Rasterfile
  1474.            Full/Reduced Color images are stored in a 24-bit RGB format,
  1475.            Greyscale images are stored in an 8-bit greyscale format, and B/W
  1476.            Dithered images are stored in a 1-bit B/W format.
  1477.  
  1478.       PostScript
  1479.            Full/Reduced Color images are stored in a 24-bit RGB format,
  1480.            Greyscale images are stored in an 8-bit greyscale format, and B/W
  1481.            Dithered images are stored in a 1-bit B/W format.
  1482.  
  1483.            XV writes Encapsulated PostScript, so you can incorporate xv-
  1484.            generated PostScript into many desktop-publishing programs.  XV
  1485.            also prepends some color-to-greyscale code, so even if your
  1486.            printer doesn't support color, you can still print 'color'
  1487.            PostScript images.  These images will be three times larger (in
  1488.            file size) than their greyscale counterparts, so it's a good idea
  1489.            to save Greyscale PostScript, unless you know you may be printing
  1490.            the file on a color printer at some point.
  1491.  
  1492.            Also, you should probably never need to generate B/W Dithered
  1493.            PostScript, as every PostScript printer I've ever heard of can
  1494.            print greyscale images.  The only valid cases I can think of are:
  1495.            A) doing it for a special effect, and B) doing it to generate a
  1496.            much smaller (roughly 1/8th the size) PostScript file.
  1497.  
  1498.            Note: When you try to save a PostScript file, the xv postscript
  1499.            window will pop up to let you specify how you want the image
  1500.            printed.  (See "Section 8: The PostScript Window", for details.)
  1501.  
  1502.       JPEG XV writes files in the JFIF format created by the Independent
  1503.            JPEG Group.  Full/Reduced Color images are written in a 24-bit
  1504.            RGB format, and Greyscale images are written in an 8-bit
  1505.            greyscale format.  B/W Dithered images should not be used, as
  1506.            they will probably wind up being larger than Greyscale versions
  1507.            of the same images, due to the way JPEG works.
  1508.  
  1509.            When you save in the JPEG format, a dialog box will pop up and
  1510.            ask you for a quality setting.  '75%' is the default value, and
  1511.            really, it's a fine value.  You shouldn't have to change it
  1512.            unless you're specifically trying to trade off quality for
  1513.            compression, or vice versa.  The useful range of values is 5%-
  1514.            95%.
  1515.  
  1516.                                    - 30 -     Formatted:  September 27, 1994
  1517.  
  1518.  SECTION 8: THE POSTSCRIPT WINDOW
  1519.       The xv postscript window lets you describe how your image should look
  1520.       when printed.  You can set the paper size and the image size, position
  1521.       the image on the paper, and print in 'portrait' or 'landscape' mode.
  1522.  
  1523.       The majority of the xv postscript window is taken up by a window that
  1524.       shows a white rectangle (the page) with a black rectangle (the image)
  1525.       positioned on it.  You can position the image rectangle anywhere on
  1526.       the page.  The only constraint is that the center of the image (where
  1527.       the two diagonal lines meet) must remain on the page.  Only the
  1528.       portion of the image that is on the page will actually be printed.
  1529.  
  1530.       The image can be (roughly) positioned on the page by clicking in the
  1531.       image rectangle and dragging it around.  As you move the image, the
  1532.       "Top" and "Left" position displays will show the size of the top and
  1533.       left margins (the distance between the top-left corner of the page and
  1534.       the top-left corner of the image).
  1535.  
  1536.       You'll note that you have limited placement resolution with the mouse.
  1537.       If you want to fine-position the image, you can use the arrow keys to
  1538.       move the image around.  The arrow keys will move the image in .001"
  1539.       increments.  You can hold them down, and they will auto-repeat.  You
  1540.       can also hold a <shift> key down while using the arrow keys.  This
  1541.       will move the image in .01" increments.
  1542.  
  1543.       You can change the size of the printed image by adjusting the "Width"
  1544.       or "Height" dials.  Normally, the dials are locked together, to keep
  1545.       the aspect ratio of the image constant.  You can unlock the dials by
  1546.       turning the off the checkbox located below the dials.  As you change
  1547.       the dials, the size of the image (when printed) is displayed below, in
  1548.       inches and in millimeters.  The current resolution of the image is
  1549.       also displayed below.  The "Resolution" numbers tell you how many
  1550.       image pixels will be printed per inch.
  1551.  
  1552.       Located below the 'page' rectangle are a set of radio buttons that let
  1553.       you specify the current paper size (8.5" x 11", 8.5" x 14", 11" x 17",
  1554.       A4, and B5), and orientation (Portrait and Landscape).
  1555.  
  1556.       The Center button will center the image on the page.  The Maxpect
  1557.       button will make the image as large as possible (maintaining half-inch
  1558.       margins on all sides) without changing the aspect ratio.
  1559.  
  1560.       There are a pair of small buttons located next to the "Left" and "Top"
  1561.       displays.  Clicking the "Left" one will cycle between displaying the
  1562.       "Left" margin, the "Right" margin, and the "Center X" position (the
  1563.       distance from the left edge of the paper to the center of the image).
  1564.  
  1565.       Clicking the "Top" display's button will cycle between displaying the
  1566.       size of the "Top" margin, the size of the "Bottom" margin, and the
  1567.       "Center Y" position (the distance from the top edge of the paper to
  1568.       the center of the image).
  1569.  
  1570.                                    - 31 -     Formatted:  September 27, 1994
  1571.  
  1572.       Click the "Ok" button when you're finished with the xv postscript
  1573.       window.  If everything is successful, the xv postscript and the xv
  1574.       save window will both close.  If xv was unable to write the PostScript
  1575.       file, the xv postscript window will close, but the xv save window will
  1576.       remain open, to give you a chance to enter a different filename.
  1577.  
  1578.  SECTION 9: MODIFYING XV BEHAVIOR
  1579.       XV supports literally dozens of command line options and X11
  1580.       resources.  Fortunately, it is doubtful that you'll ever need to use
  1581.       more than a small few.  The rest are provided mainly for that 'one
  1582.       special case' application of xv...
  1583.  
  1584.     Section 9.1: Command Line Options Overview
  1585.       If you start xv with the command 'xv -help', the current list of
  1586.       options will be displayed:
  1587.  
  1588.            xv [-] [-2xlimit] [-aspect w:h] [-bg color] [-black color]
  1589.            [-bw width] [-cegeometry geom] [-cemap] [-cgeometry geom]
  1590.            [-clear] [-cmap] [-cursor char#] [-DEBUG level]
  1591.            [-display disp] [-dither] [-expand exp] [-fg color]
  1592.            [-fixed] [-geometry geom] [-help] [-hi color] [-hsv]
  1593.            [-igeometry geom] [-imap] [-keeparound] [-lo color] [-max]
  1594.            [-maxpect] [-mono] [-ncols nc] [-nglobal] [-ninstall]
  1595.            [-nopos] [-noqcheck] [-owncmap] [-perfect] [-quit] [-rbg color]
  1596.            [-rfg color] [-rgb] [-rmode mode] [-root] [-rw] [-slow24]
  1597.            [-smooth] [-visual type] [-wait seconds] [-white color]
  1598.            [-wloop] [filename ...]
  1599.  
  1600.     Section 9.2: General Options
  1601.       -help
  1602.            Print usage instructions, listing the current available command-
  1603.            line options.  Any unrecognized option will do this as well.
  1604.  
  1605.       -display disp
  1606.            Specifies the display that xv should attempt to connect to.  If
  1607.            you don't specify a display, xv will use the environment variable
  1608.            $DISPLAY.
  1609.  
  1610.       -fg color  (Resource name: foreground string)
  1611.            Sets the foreground color used by the windows.
  1612.  
  1613.       -bg color  (Resource name: background string)
  1614.            Sets the background color used by the windows.
  1615.  
  1616.                                    - 32 -     Formatted:  September 27, 1994
  1617.  
  1618.       -hi color  (Resource name: highlight string)
  1619.            Sets the highlight color used for the top-left edges of the
  1620.            control buttons.
  1621.  
  1622.       -lo color  (Resource name: lowlight string)
  1623.            Sets the lowlight color used for the bottom-right edges of the
  1624.            control buttons, and also the background of some windows.
  1625.  
  1626.       -bw bwidth  (Resource name: borderWidth integer)
  1627.            Sets the width of the border on the windows.  Your window manager
  1628.            may choose to ignore this, however.
  1629.  
  1630.     Section 9.3: Image Sizing Options
  1631.       -geometry geom  (Resource name: geometry string)
  1632.            Lets you specify the size and placement of the 'image' window.
  1633.            It's most useful when you only specify a position, and let xv
  1634.            choose the size.  If you specify a size as well, xv will create a
  1635.            window of that size, unless -fixed is specified.  The geom
  1636.            argument is in the form of a normal X geometry string (e.g.
  1637.            "300x240" or "+10+10" or "400x300+10+10").
  1638.  
  1639.       -fixed  (Resource name: fixed boolean)
  1640.            Only used in conjunction with the -geometry option.  If you
  1641.            specify a window size with the -geometry option, xv will normally
  1642.            stretch the picture to exactly that size.  This is not always
  1643.            desirable, as it may seriously distort the aspect ratio of the
  1644.            picture.  Specifying the -fixed option corrects this behavior by
  1645.            instructing xv to use the specified geometry size as a maximum
  1646.            window size.  It will, however, preserve the original aspect
  1647.            ratio of the picture.
  1648.  
  1649.            For example, if you give a rectangular geometry of '320x240', and
  1650.            you try to display a square picture with a size of '256x256', the
  1651.            window opened will actually be '240x240', which is the largest
  1652.            square that still fits in the '320x240' rectangle that was
  1653.            specified.
  1654.  
  1655.       -expand exp  (Resource name: expand  floating-point)
  1656.            Lets you specify an initial expansion or compression factor for
  1657.            the picture.  You can specify floating-point values.  Values
  1658.            larger than zero multiply the picture's dimensions by the given
  1659.            factor.  (i.e., an expand factor of '3' will make a 320x200 image
  1660.            display as 960x600).
  1661.  
  1662.            Factors less than zero are treated as reciprocals.  (i.e., an
  1663.            expand factor of '-4' makes the picture 1/4th its normal size.).
  1664.  
  1665.                                    - 33 -     Formatted:  September 27, 1994
  1666.  
  1667.            '0' is not a valid expansion factor.
  1668.  
  1669.       -aspect w:h  (Resource name: aspect string)
  1670.            Lets you set an initial aspect ratio, and also sets the value
  1671.            used by the Aspect control.  The aspect ratio of nearly every X
  1672.            display (and, in fact, any civilized graphics display) is 1:1.
  1673.            What this means is that pixels appear to be 'square'.  A 100
  1674.            pixel wide by 100 pixel high box will appear on the screen as a
  1675.            square.  Unfortunately, this is not the case with some screens
  1676.            and digitizers.  The -aspect option lets you stretch the picture
  1677.            so that the picture appears correctly on your display.  Unlike
  1678.            the other size-related options, this one doesn't care what the
  1679.            size of the overall picture is.  It operates on a pixel-by-pixel
  1680.            basis, stretching each image pixel slightly, in either width or
  1681.            height, depending on the ratio.
  1682.  
  1683.            Aspect ratios greater than '1:1' (e.g., '4:3') make the picture
  1684.            wider than normal.  Aspect ratios less than '1:1' (e.g. '2:3')
  1685.            make the picture taller than normal.  (Useful aspect ratio: A
  1686.            512x480 image that was supposed to fill a standard 4x3 video
  1687.            screen (produced by many video digitizers) should be displayed
  1688.            with an aspect ratio of '5:4')
  1689.  
  1690.     Section 9.4: Color Allocation Options
  1691.       -ncols nc  (Resource name: ncols integer)
  1692.            Sets the maximum number of colors that xv will use.  Normally,
  1693.            this is set to 'as many as it can get'.  However, you can set
  1694.            this to smaller values for interesting effect.  Most notably, if
  1695.            you set it to '0', it will display the picture by dithering with
  1696.            'black' and 'white'.  (The actual colors used can be set by the
  1697.            -black and -white options, below.)
  1698.  
  1699.       -nglobal (Resource name: nglobal boolean)
  1700.            Adjusts the way the program behaves when it is unable to get all
  1701.            the colors it requested.  Normally, it will search the display's
  1702.            default colormap, and 'borrow' any colors it deems appropriate.
  1703.            These borrowed colors are, however, not owned by xv, and as such,
  1704.            can changed without xv's permission, or knowledge.  If this
  1705.            happens, the displayed picture will change, in a less-than-
  1706.            desirable direction.  If you specify the -nglobal option, xv will
  1707.            not use 'global' colors.  It will only use colors that it
  1708.            successfully allocated, which makes it immune to any color
  1709.            changes.
  1710.  
  1711.            It should be noted that 'use global colors' is the default
  1712.            because color changes aren't generally a problem if you are only
  1713.            using xv to display a picture for a short time.  Color changes
  1714.            only really become a problem if you use xv to display a picture
  1715.  
  1716.                                    - 34 -     Formatted:  September 27, 1994
  1717.  
  1718.            that you will be keeping around for a while, while you go and do
  1719.            some other work (such as using xv to display a background).  In
  1720.            such cases you will want to specify -nglobal.  Note: using the
  1721.            -ncols or -root options automatically turn on -nglobal.
  1722.  
  1723.       -rw  (Resource name: rwColor boolean)
  1724.            Tells xv to use read/write color cells.  Normally, xv allocates
  1725.            colors read-only, which allows it to share colors with other
  1726.            programs.  If you use read/write color cells, no other program
  1727.            can use the colors that xv is using, and vice-versa.  The only
  1728.            reason you'd do such a thing is that using read/write color cells
  1729.            allows the Apply function in the xv color editor window to
  1730.            operate much faster.
  1731.  
  1732.       -perfect  (Resource name: perfect boolean)
  1733.            Makes xv try 'extra hard' to get all the colors it wants.  In
  1734.            particular, when -perfect is specified, xv will allocate and
  1735.            install its own colormap if (and only if) it was unable to
  1736.            allocate all the desired colors.  This option is not allowed in
  1737.            conjunction with the -root option.
  1738.  
  1739.       -owncmap  (Resource name: ownCmap boolean)
  1740.            Like '-perfect', only this option forces xv to always allocate
  1741.            and install its own colormap, thereby leaving the default
  1742.            colormap untouched.
  1743.  
  1744.       -ninstall  (Resource name: ninstall boolean)
  1745.            Prevents xv from 'installing' its own colormap, when the -perfect
  1746.            or -owncmap options are in effect.  Instead of installing the
  1747.            colormap, it will merely 'ask the window manager, nicely' to take
  1748.            care of it.  This is the correct way to install a colormap (i.e.,
  1749.            ask the WM to do it), unfortunately, it doesn't actually seem to
  1750.            work in many window managers, so the default behavior is for xv
  1751.            to handle installation itself.  However, this has been seen to
  1752.            annoy one window manager (dxwm), so this option is provided if
  1753.            your WM doesn't like programs installing their own colormaps.
  1754.  
  1755.     Section 9.5: 24-bit Conversion Options
  1756.       The following options only come into play if you are using xv to
  1757.       display 24-bit RGB data (PPM files, color PM files, JPEG files, and
  1758.       the output of bggen).  They have no effect whatsoever on how GIF
  1759.       pictures or 8-bit greyscale images are displayed.
  1760.  
  1761.       -slow24  (Resource name: slow24 boolean)
  1762.            Specifies that the 'alternate' 24-bit to 8-bit conversion
  1763.  
  1764.                                    - 35 -     Formatted:  September 27, 1994
  1765.  
  1766.            algorithm is to be used by the program.  The default algorithm
  1767.            dithers the picture using a fixed set of colors that roughly
  1768.            approximate all displayable colors.  The -slow24 algorithm picks
  1769.            the 'best' colors on a per-image basis, and dithers with those.
  1770.  
  1771.            Advantages: The -slow24 algorithm often produces better looking
  1772.            pictures.
  1773.  
  1774.            Disadvantages: The -slow24 algorithm is about half the speed of
  1775.            the default algorithm.  Also, since the colors are chosen on a
  1776.            per-image basis, it can't be used to display multiple images
  1777.            simultaneously, as each image will almost certainly want a
  1778.            different set of 256 colors.  The default algorithm, however,
  1779.            uses the same exact colors for all images, so it can display many
  1780.            images simultaneously, without running out of colors.  Also, the
  1781.            -slow24 algorithm occasionally produces worse-looking pictures
  1782.            than the default algorithm, particularly on displays with very
  1783.            few colors.  The default algorithm produces nice, dependably
  1784.            'okay' pictures.
  1785.  
  1786.       -noqcheck  (Resource name: noqcheck boolean)
  1787.            Turns off a 'quick check' that is normally made.  Normally,
  1788.            before running either of the 24-bit to 8-bit conversion
  1789.            algorithms, xv determines whether the picture to be displayed has
  1790.            more than 256 unique colors in it.  If the picture doesn't, it
  1791.            will treat the picture as an 8-bit colormapped image (i.e., GIF),
  1792.            and won't run either of the conversion algorithms.
  1793.  
  1794.            Advantages: The pictures will be displayed 'perfectly', whereas
  1795.            if they went through either of the conversion algorithms, they'd
  1796.            be dithered.
  1797.  
  1798.            Disadvantages: Often uses a lot of colors, which limits the
  1799.            ability to view multiple images at once.  (See the -slow24 option
  1800.            above for further info about color sharing.)
  1801.  
  1802.     Section 9.6: Root Window Options
  1803.       xv has the ability to display images on the root window of an X
  1804.       display, rather than opening its own window (the default behavior).
  1805.       When using the root window, the program is somewhat limited, because
  1806.       the program cannot receive input events (key press and mouse clicks)
  1807.       from the root window.  As a result, you cannot track pixel values, or
  1808.       crop, nor can you use keyboard commands while the mouse is in the root
  1809.       window.
  1810.  
  1811.       -root  (Resource name:  <none>)
  1812.            Directs xv to display images in the root window, instead of
  1813.            opening its own window.  Exactly how the images will be displayed
  1814.  
  1815.                                    - 36 -     Formatted:  September 27, 1994
  1816.  
  1817.            in the root window is determined by the setting of the -rmode
  1818.            option.
  1819.  
  1820.       -rmode mode    (Resource name: rootMode integer)
  1821.            Determines how images are to be displayed on the root window,
  1822.            when -root has been specified.  You can find the current list of
  1823.            'modes' by using a mode value of '-1'.  XV will complain, and
  1824.            show a list of valid modes.  The current list at of the time of
  1825.            this writing is:
  1826.  
  1827.                 0:   tiling
  1828.                 1:   integer tiling
  1829.                 2:   mirrored tiling
  1830.                 3:   integer mirrored tiling
  1831.                 4:   centered tiling
  1832.                 5:   centered on a solid background
  1833.                 6:   centered on a 'warp' background
  1834.                 7:   centered on a 'brick' background
  1835.  
  1836.            The default mode is '0'.  See "Section 3.5: The Display Modes
  1837.            Menu" for a description of the different display modes.
  1838.  
  1839.       -rfg color  (Resource name: rootForeground string)
  1840.            Sets the 'foreground' color used in some of the root display
  1841.            modes.
  1842.  
  1843.       -rbg color  (Resource name: rootBackground string)
  1844.            Sets the 'background' color used in some of the root display
  1845.            modes.
  1846.  
  1847.       -max  (Resource name: <none>)
  1848.            Makes xv automatically stretch the image to the full size of the
  1849.            screen.  This is mostly useful when you want xv to display a
  1850.            background.  While you could just as well specify the dimensions
  1851.            of your display ('-geom 1152x900' for example), the -max option
  1852.            is display-independent.  If you suddenly decide to start working
  1853.            on a 1280x1024 display (ferinstance) the same command will still
  1854.            work.  Note: If you specify -max when you aren't using -root, the
  1855.            behavior is slightly different.  The image will be made as large
  1856.            as possible while still preserving the normal aspect ratio.
  1857.  
  1858.       -maxpect  (Resource name: <none>)
  1859.            Makes the image as large as possible while preserving the aspect
  1860.            ratio.
  1861.  
  1862.                                    - 37 -     Formatted:  September 27, 1994
  1863.  
  1864.       -quit  (Resource name: <none>)
  1865.            Makes xv display the (first) specified file and exit, without any
  1866.            user intervention.  Since images displayed on the root window
  1867.            remain there until explicitly cleared, this is very useful for
  1868.            having xv display background images on the root window in some
  1869.            sort of start-up script.  Needless to say, this is only useful if
  1870.            you are using -root.
  1871.  
  1872.       -clear  (Resource name: <none>)
  1873.            Clears the root window of any extraneous xv images.  Note: it is
  1874.            not necessary to do an 'xv -clear' before displaying another
  1875.            picture in the root window.  xv will detect that there's an old
  1876.            image in the root window and automatically clear it out (and free
  1877.            the associated colors).
  1878.  
  1879.     Section 9.7: Window Options
  1880.       XV currently consists of three main windows, plus one window for the
  1881.       actual image.  These three windows (the xv controls window, the xv
  1882.       info window, and the xv color editor window) may be automatically
  1883.       mapped and positioned when the program starts.
  1884.  
  1885.       -cmap  (Resource name: ctrlMap boolean)
  1886.            Maps the xv controls window.
  1887.  
  1888.       -cgeom geom  (Resource name: ctrlGeometry string)
  1889.            Sets the initial geometry of the xv controls window.  Note: only
  1890.            the position information is used.  The window is of fixed size.
  1891.  
  1892.       -imap  (Resource name: infoMap boolean)
  1893.            Maps the xv info window.
  1894.  
  1895.       -igeom geom  (Resource name: infoGeometry string)
  1896.            Sets the initial geometry of the xv info window.  Note: only the
  1897.            position information is used.  The window is of fixed size.
  1898.  
  1899.       -cemap  (Resource name: ceditMap boolean)
  1900.            Maps the xv color editor window.
  1901.  
  1902.       -cegeom geom  (Resource name: ceditGeometry string)
  1903.            Sets the initial geometry of the xv color editor window.  Note:
  1904.            only the position information is used.  The window is of fixed
  1905.            size.
  1906.  
  1907.                                    - 38 -     Formatted:  September 27, 1994
  1908.  
  1909.       -nopos  (Resource name: nopos boolean)
  1910.            Turns off the 'default' positioning of the various xv windows.
  1911.            Every time you open a window, you will be asked to position it.
  1912.            (Assuming your window manager asks you such things.  mwm, for
  1913.            instance doesn't seem to ask)
  1914.  
  1915.     Section 9.8: Miscellaneous Options
  1916.       -mono  (Resource name: mono boolean)
  1917.            Forces the image to be displayed as a greyscale.  This is most
  1918.            useful when you are using certain greyscale X displays.  While xv
  1919.            attempts to determine if it's running on a greyscale display,
  1920.            many X displays lie, and claim to be able to do color.  (This is
  1921.            often because they have color graphics boards hooked up to b/w
  1922.            monitors.  The computer, of course, has no way of knowing what
  1923.            type of monitor is attached.)  On these displays, if you don't
  1924.            specify -mono, what you will see is a greyscale representation of
  1925.            one of the RGB outputs of the system.  (For example, you'll see
  1926.            the 'red' output on our greyscale Sun 3/60s.) The -mono option
  1927.            corrects this behavior.
  1928.  
  1929.       -white color  (Resource name: white string)
  1930.            Specifies the 'white' color used when the picture is b/w
  1931.            stippled.  (When '-ncols 0' has been specified.)
  1932.  
  1933.       -black color  (Resource name: black string)
  1934.            Specifies the 'black' color used when the picture is b/w
  1935.            stippled.  (When '-ncols 0' has been specified.)
  1936.  
  1937.            Try something like: 'xv -ncols 0 -bl red -wh yellow <filename>'
  1938.            for some interesting, late-'60s-style psychodelia effects.
  1939.  
  1940.       -wait secs  (Resource name: <none>)
  1941.            Turns on a 'slide-show' feature.  Normally, if you specify
  1942.            multiple input files, xv will display the first one, and wait for
  1943.            you to give the Next command (or whatever).  The -wait option
  1944.            makes xv wait the specified number of seconds, and then go on to
  1945.            the next picture, without any user intervention.  The program
  1946.            still accepts commands, so it's possible to 'abort' the current
  1947.            picture without waiting the full specified time by using the Next
  1948.            command.
  1949.  
  1950.       -wloop  (Resource name: <none>)
  1951.            Normally, when running a slide-show with the -wait option, xv
  1952.            will terminate after displaying the last image.  If you also
  1953.            specify the -wloop option, the program will loop back to the
  1954.            first image and continue the slide-show until the user issues the
  1955.  
  1956.                                    - 39 -     Formatted:  September 27, 1994
  1957.  
  1958.            Quit command.
  1959.  
  1960.       -rgb  (Resource name: hsvMode boolean)
  1961.            Specifies that, by default, the colormap editing dials in the xv
  1962.            color editor window should be in RGB mode.  This is the normal
  1963.            default behavior.
  1964.  
  1965.       -hsv  (Resource name: hsvMode boolean)
  1966.            Specifies that, by default, the colormap editing dials in the xv
  1967.            color editor window should be in HSV mode.
  1968.  
  1969.       -dither  (Resouce name: autoDither boolean)
  1970.            When specified, tells xv to automatically issue a Dither command
  1971.            whenever an image is first displayed.  Useful on displays with
  1972.            limited color capabilities (4-bit and 6-bit displays.)
  1973.  
  1974.       -smooth  (Resource name:  autoSmooth boolean)
  1975.            When specified, tells xv to automatically issue a Smooth command
  1976.            whenever an image is first displayed.  This is useful when you
  1977.            are using one of the image sizing options (such as '-expand' or
  1978.            '-max').
  1979.  
  1980.       -visual vistype  (Resource name: visual string)
  1981.            Normally, xv uses the default visual model provided by your X
  1982.            server.  You can override this by explicitly selecting a visual
  1983.            to use.  Valid types are StaticGray, StaticColor, TrueColor,
  1984.            GrayScale, PseudoColor,
  1985.             and DirectColor.  Not all of these are necessarily provided on
  1986.            any given X display.  Run xdpyinfo on your display to find out
  1987.            what visual types are supported.
  1988.  
  1989.       -cursor curs  (Resource name: cursor integer)
  1990.            Specifies an alternate cursor to use in the image window (instead
  1991.            of the normal 'cross' cursor).  curs values are obtained by
  1992.            finding the character number of a cursor you like in the 'cursor'
  1993.            font.  (Run 'xfd -fn cursor' to display the cursor font.)  For
  1994.            example, a curs value of '56' corresponds to the (singularly
  1995.            useless) 'Gumby' cursor.
  1996.  
  1997.       -keeparound  (Resource name: keepAround boolean)
  1998.            By default if you Delete the last file in the xv controls list,
  1999.            the program will automatically exit, as a convenience.  If you
  2000.            find this an inconvenience, the -keeparound option inhibits this
  2001.            behavior.
  2002.  
  2003.                                    - 40 -     Formatted:  September 27, 1994
  2004.  
  2005.       -2xlimit  (Resource name: 2xlimit boolean)
  2006.            By default, xv prevents the image window from ever getting larger
  2007.            than the screen.  Unfortunately, because of this, if you load an
  2008.            image that is larger than your screen, the image will be shrunk
  2009.            until it fits on your screen.  Some folks find this undesirable
  2010.            behavior.  Specifying the -2xlimit option doubles the size
  2011.            limitations.  The image window will be kept from getting larger
  2012.            than 2x the width and height of your screen.
  2013.  
  2014.            Just in case you're wondering why there's any size limitations:
  2015.            it's fairly easy to accidentally ask for a huge image to be
  2016.            generated.  Simply crop a section of the image, zoom so you can
  2017.            see the individual pixels, and uncrop.  If there were no size
  2018.            limitations, the (expanded many times) image could be huge, and
  2019.            might crash your X server.  At the very least, it would take a
  2020.            long period of time, and freeze your X server during part of it.
  2021.            Generally undesirable behavior.
  2022.  
  2023.       -DEBUG level  (Resource name: <none>)
  2024.            Turns on some debugging information.  You shouldn't need this.
  2025.            If everything worked perfectly, I wouldn't need this either.
  2026.  
  2027.       -    Specifying '-' all by itself tells xv to take its input from
  2028.            stdin, rather then from a file.  This lets you put xv on the end
  2029.            of a Un*x pipe.
  2030.  
  2031.     Section 9.9: Color Editor Resources
  2032.       You can set default values for all of the HSV and RGB modification
  2033.       controls in the xv color editor window via X resources.  The easiest
  2034.       way to explain this is with an example.
  2035.  
  2036.       o+  Start xv and put it in the background by typing 'xv &'.
  2037.  
  2038.       o+  Type the command 'cat >foo' in an active xterm window
  2039.  
  2040.       o+  Bring the xv color editor window up.
  2041.  
  2042.       o+  Issue the Cut Resources command.
  2043.  
  2044.       o+  Click your Middle mouse button in the xterm window.  A set of
  2045.          resource lines describing the current state of the xv color editor
  2046.          controls will be 'pasted' into the window.
  2047.  
  2048.       o+  You could type '<ctrl-D>' in the xterm to complete the cat command,
  2049.          edit this file, and put it in your .Xdefaults/.Xresources file.
  2050.  
  2051.          The lines generated by Cut Resources will look like the following:
  2052.  
  2053.                                    - 41 -     Formatted:  September 27, 1994
  2054.  
  2055.          xv.default.huemap1: 330  30  CW 330  30  CW
  2056.          xv.default.huemap2:  30  90  CW  30  90  CW
  2057.          xv.default.huemap3:  90 150  CW  90 150  CW
  2058.          xv.default.huemap4: 150 210  CW 150 210  CW
  2059.          xv.default.huemap5: 210 270  CW 210 270  CW
  2060.          xv.default.huemap6: 270 330  CW 270 330  CW
  2061.          xv.default.whtmap:  0 0 1
  2062.          xv.default.satval:  0
  2063.          xv.default.igraf: S 4 : 0,0 : 64,64 : 192,192 : 254,254
  2064.          xv.default.rgraf: S 4 : 0,0 : 64,64 : 192,192 : 254,254
  2065.          xv.default.ggraf: S 4 : 0,0 : 64,64 : 192,192 : 254,254
  2066.          xv.default.bgraf: S 4 : 0,0 : 64,64 : 192,192 : 254,254 These lines
  2067.          completely describe one state of the xv color editor controls.
  2068.          There are five different states that you can specify via X
  2069.          resources.  The 'default' state (as shown) holds the settings used
  2070.          whenever the program is first started, and whenever the Reset
  2071.          command is used.  You can also store settings in one of the four xv
  2072.          presets (accessed via the '1'-'4' buttons in the xv color editor)
  2073.          by changing the string 'default' in the above lines to 'preset1',
  2074.          'preset2', 'preset3', or 'preset4' respectively.
  2075.  
  2076.          There are four types of resource described in these lines: huemap,
  2077.          whtmap, satval, and graf.
  2078.  
  2079.     Section 9.9.1: Huemap Resources
  2080.       The huemap resources describe the state of the hue remapping dials.
  2081.       There are six huemap resources per state of the xv color editor.
  2082.       These huemap resources are numbered 'huemap1', 'huemap2', ...
  2083.       'huemap6', and correspond to the '1'-'6' radio buttons under the hue
  2084.       remapping dials.
  2085.  
  2086.       Each huemap resources takes six parameters:
  2087.  
  2088.       1. The 'starting' angle of the From range, in degrees (integer).
  2089.  
  2090.       2. The 'ending' angle of the From range, in degrees (integer).
  2091.  
  2092.       3. The direction of the From range.  Either 'cw' (clockwise) or 'ccw'
  2093.          (counter-clockwise).
  2094.  
  2095.       4. The 'starting' angle of the To range, in degrees (integer).
  2096.  
  2097.       5. The 'ending' angle of the To range, in degrees (integer).
  2098.  
  2099.       6. The direction of the To range.  Either 'cw' or 'ccw'.
  2100.  
  2101.     Section 9.9.2: Whtmap Resources
  2102.       The whtmap resource describes the state of the white remapping
  2103.       control.  There is one whtmap resource per state of the xv color
  2104.  
  2105.                                    - 42 -     Formatted:  September 27, 1994
  2106.  
  2107.       editor controls.  The whtmap resource takes three parameters:
  2108.  
  2109.       1. The hue to remap 'white' to, in degrees (integer).
  2110.  
  2111.       2. The saturation to give to the remapped 'white', in percent
  2112.          (integer).
  2113.  
  2114.       3. A boolean specifying whether the white remapping control is
  2115.          enabled.  If '1', the control is enabled.  If '0', the control is
  2116.          disabled.
  2117.  
  2118.     Section 9.9.3: Satval Resource
  2119.       The satval resource describes the value of the Saturation dial.  There
  2120.       is one satval resource per state.  The satval resource takes a single
  2121.       integer value, in the range +/-100, which specifies how much to add or
  2122.       subtract to overall image color saturation.
  2123.  
  2124.     Section 9.9.4: Graf Resources
  2125.       The graf resources describe the state of the four 'graph' windows in
  2126.       the xv color editor window (Intensity, Red, Green, and Blue).  The
  2127.       graf resources can be in one of two formats, 'gamma' and
  2128.       'spline/line'.  In 'gamma' format, the graf resource takes two
  2129.       parameters:
  2130.  
  2131.       1. The letter 'G', specifying 'gamma' mode
  2132.  
  2133.       2. A single floating point number specifying the gamma value.
  2134.  
  2135.          In 'spline/line' mode, the graf resource takes a variable number of
  2136.          parameters:
  2137.  
  2138.       1. The letter 'S' specifying 'spline' mode, or the letter 'L'
  2139.          specifying 'line' mode.
  2140.  
  2141.       2. An integer number indicating the number of handles (control points)
  2142.          that this graph window will have.  (Must be in the range 2-16,
  2143.          inclusive.)
  2144.  
  2145.       3. For each handle, there will be a ':', and the x and y positions of
  2146.          the handle, separated by a comma.  The x and y positions can be in
  2147.          the range 0-255 inclusive.
  2148.  
  2149.  LIMITATIONS
  2150.       xv will NOT work on displays that aren't 1-, 4-, 6-, 8-, 16- 24-, or
  2151.       32-bits deep.  Luckily, that should still cover nearly every display
  2152.       out there.  It may not work on certain 6- or 24-bit displays.
  2153.  
  2154.                                    - 43 -     Formatted:  September 27, 1994
  2155.  
  2156.       It also only displays the first image in GIF files that have multiple
  2157.       images in them.
  2158.  
  2159.       As for PM pictures, this program only displays 1-plane PM_I pictures,
  2160.       or 1-, 3-, or 4-plane PM_C pictures.
  2161.  
  2162.  PM FORMAT
  2163.       The PM format is a file format that we use at the GRASP Lab for our
  2164.       image processing work.  If you aren't at Penn, you are unlikely to
  2165.       ever run into a PM-format file, so don't worry about it.  Please
  2166.       ignore all references to PM.
  2167.  
  2168.       The 4-, 6-, 16-, 24-, and 32-bit code has not been extensively tested.
  2169.       (A 4-bit MicroVax GPX system, a 6-bit HP 9000/320, a 16-bit Sony 3710,
  2170.       and a 24-bit HP 9000/350, respectively.  The 32-bit code hasn't
  2171.       actually been tested at all.) You won't be able to do '-ncols 0' on a
  2172.       6-, 16-, 24-, or 32-bit display, not that you should want to.
  2173.  
  2174.  AUTHORS
  2175.       John Bradley  -  bradley@cis.upenn.edu
  2176.  
  2177.       GIF reading code based on gif2ras.c, by Patrick J. Naughton
  2178.       (naughton@wind.sun.com)
  2179.  
  2180.       GIF writing code essentially unchanged from code written by Michael
  2181.       Maudlin (mlm@cs.cmu.edu).
  2182.  
  2183.       SUN Rasterfile i/o code written by Dave Heath  (heath@cs.jhu.edu)
  2184.  
  2185.       JPEG interface code written by Markus Baur  (s_baur@iravcl.ira.uka.de)
  2186.  
  2187.       JPEG i/o code provided by the Independent JPEG Group.
  2188.  
  2189.                                    - 44 -     Formatted:  September 27, 1994
  2190.  
  2191.