			      Vimage 1.1
		   Copyright (c) 1995, Joe Traister

Vimage is a picture viewing program for Linux using the SVGA library.
It can view a number of popular image formats: JPEG, GIF, Sun
Rasterfiles, PBM files, Targa files and TIFF files at the moment. It
is being developed using a Slackware 3.0.0 installation of Linux,
kernel version 1.3.52, on a 486DX2-66 with 16M RAM and a Cirrus Logic
5428 VLB Video board with 2M video RAM and a Pentium-90 with 8M RAM and
and ATI Graphics Ultra Pro (Mach 32) with 2M Video RAM. Slackware 3.0.0
comes with JPEG library version 4, which must be replaced with JPEG
library 5 to use JPEG support in this program.

There are three methods of file input for vimage. A single file can be
piped as the standard input (i.e. cat file.jpg | vimage), given
explicitly on the command line (i.e. vimage file.jpg), or the files
may be specified in a slide file (i.e. vimage -s file.pics). A slide
file contains the name of each file to be displayed, one per line.
Blank lines are allowed and all text after a pound sign (#) is treated
as a comment (i.e. it's ignored). Vimage also ignores leading and
trailing whitespace in a filename.

If there is only one file to display, vimage displays the file on the
screen, waits for a keypress, and then exits. If there is more than
one file, and the -c option is not used, each file specified will be
displayed for 6 seconds (overridden by the -d option). After showing
all the images once, vimage will exit. If the -l option is used, the
images will repeat the specified number of times and then vimage will
exit.

When the -c option is given to vimage, all the files listed on the
command line or in the slide file are displayed in an ncurses-based
file selector. To move the highlight cursor, use the arrow keys. To
view an image, press enter when its name is in the highlight
cursor. To return to the file selector, press any key. Pressing the
'D' key causes vimage to ask if you want to delete the file. The
spacebar is used to toggle the file's mark. Use the 's' key to view
the marked files in a slide show. Use 'S' to save the list of marked
filenames. The 'c' key clears all marks. The 'x' key displays image
statistics. 'H' or 'h' causes vimage to display a help screen with
these options. To quit vimage, press the 'q' key or the ESC key. Note
that the -c option ignores the use of -R, -r, -l, -d and -x options,
although any of the display options may be used with it (-2, -f, -a
and -m).

The video mode used for display defaults to G320x200x256. This default
can be overridden by using the GSVGAMODE environment variable, which
can be overridden by using the -m option followed by a video mode name
(i.e. G1024x768x256). If the -a option is given, all other methods of
setting the display mode are ignored, and the pictures are displayed
with the best match of colors and resolution. In all cases, if the
picture to be displayed is larger than the video mode chosen, the
picture will be scaled to fit the screen. (See note about Cirrus Logic
5426/8 2M boards).

When displaying 24-bit images on an 8-bit display, vimage uses a 6x7x6
RGB color cube, combined with a Floyd-Steinberg dither to map the
image to 8-bit. A 6x7x6 palette was used instead of the standard 6x6x6
palette to increase the luminous precision of the palette. (The green
channel accounts for 58.7% of the luminosity, or brightness, of a
pixel.) The palette to be used to display the image can be computed
using a Heckbert median cut algorithm by using the -2 option.  In
addition, a Floyd-Steinberg dither can be applied by also supplying
the -f option. The -f option is functional only with the -2
option. The use of the -2 option usually results in a better display
quality, however, it it much slower than using the RGB color cube.

The -x option causes vimage not to display any pictures, but prints
the size, number of colors and type of image instead. The -q option
causes vimage to ignore files it can't process and proceed to the next
file to be displayed without giving an error message.

NOTE: The SVGA driver for Linux exhibits problems initializing 24-bit
display modes with Cirrus Logic CLDG-5426/28 cards. For this reason a
command line switch (-t) has been added to force the driver to use only 8-,
15- and 16-bit modes when displaying with the -a option. The bug does
not appear to affect displaying all the files in the same video mode,
regardless of the number of colors, so you can still use true-color
modes with these cards without the -a option.

INSTALLATION
1) Edit Makefile.

To include JPEG support, set JPEG_DEF = -DJPEG_SUPPORT, set JPEG_INC to the
directory where your libjpeg include files are, and set JPEG_LIB = -ljpeg 
(If the JPEG library is not in your default ld search path, put -L <directory>
in front of -ljpeg.) NOTE: You must have JPEG library v5 to use JPEG support.
Slackware 3.0.0 comes with JPEG library v4.

To disable JPEG support, define JPEG_DEF, JPEG_INC and JPEG_LIB as empty
strings.

To include ncurses support, set NCURSES_DEF = -DNCURSES_SUPPORT, set
NCURSES_INC to the directory where the ncurses include files are, and set
NCURSES_LIB = -lncurses, or use NCURSES_LIB = -L <directory> -lncurses
if the ncurses library is not in your default search path.

To disable ncurses support, define NCURSES_DEF, NCURSES_INC, and
NCURSES_LIB to empty strings.

Set BINDIR to the directory name where you want the binary installed, set
MANDIR to the directory where the manpage should be installed.

2) make

After setting the above defines use "make" to compile to program. When you
have a good make, use "make install" as root to install the program and set
the correct permissions. Use "make install.man" to install the manpage.
