FB-RLE(1V)

NAME
fb-rle - save a frame buffer image in run-length encoded form

SYNOPSIS
fb-rle [ -CShvw ] [ -c x ] [ -l x y ] [ -p x y ] [ file.rle ]

DESCRIPTION
Fb-rle saves a frame buffer image in a file, using the Alpha_1 standard Run-Length Encoded (RLE) form. By default, the device /dev/ik0l is used for input. This may be changed by setting the environment variable FB_FILE to the name of another device or file name and exporting it before execution of fb-rle. Images may be read from disk or any supported frame buffer device. If file.rle is not specified, the encoded file is written to the standard output. Fb-rle attempts to compress flat-colored areas as much as possible. This means that it is reasonable to save the entire screen, since it will not take up much more file space than saving only the interesting portion of the image. The default action is to save only data pixels and to save the background color separately, so that when the image is restored all non-image pixels will be set to the background pixel value stored in the RLE header. Images saved in this mode may be displayed normally, or in ``overlay'' mode by the RLE decoder program (see rle-fb(1V)). Alternatively, the -S option may be used to RLE encode the background as well (recommended only if you don't have a flat background).

-C  Convert (``crunch'') an image with a non-standard color map so that the RLE file created will redisplay with a standard color map. Useful to preserve dramatic images created with wierd color maps so that Gamma correction (for film) can also be applied. This option is recommended when producing images for export to other display systems, so that variations in the processing of color maps between display hardware do not affect the displayed image.

-w  Convert the color image to black and white, and RLE encode that. The red, green, and blue components of each pixel are combined via the NTSC transform to get an intensity value (Y) which is saved.

-S  Save all data in RLE format, irrespective of whether it is background or not (``straight box save''). It is not possible to restore a file saved with -S as an overlay.

-cx Specify a color to use as the ``background''. The character x is selected from the set rgbwBG (red, green, blue, white, Black, 18% Grey). If this option is not specified, the pixel in the lower left corner of the region being saved is used as the background color.

-lx y
    Specify the size of the saved box. This is useful if only a portion of the image is to be saved.

-px y
    Specify the upper left corner of the saved portion of the image.

-v  (Verbose mode.) The program will provide voluminous status information on its standard error as it proceeds through encoding the image.

-h  HIRES mode. This flag causes the image in the frame buffer to be read back in HIRES (1024x1024x24) mode; the default is to read the image back in LORES (512x512x24) mode.

file.rle
    Output file.

EXAMPLE
    $ FB_FILE=/dev/ik1h export FB_FILE
    $ fb-rle -h tank.rle

WARNING
If no output file is specified, the user should be careful to re-direct the output to a file or pipe, as the encoded form is in binary. In doing so, be sure not to merge the standard error with the standard output as this will potentially foil the decoding step, especially if the verbose option was used.

FILES
/vld/lib/librle.a
/vld/lib/libfb.a

AUTHORS
Gary S. Moss, BRL-VLD
Michael John Muuss, BRL-SECAD

SEE ALSO
rle-fb(1V).

BUGS
The ability to save less than the whole image is not presently implemented. It would be nice if this program could determine the mode (HIRES vs. LORES) of the frame buffer, rather than needing the -h flag. Unfortunately, the hardware control registers may be write-only (as with the Ikonas), so there is no way of telling.