lviff2xbm(3)

LIBRARY ROUTINE
lviff2xbm - Converts an Khoros (viff) bitmap file to an X11 bitmap file (xbm).

LIBRARY CALL
#include "vinclude.h"
int
lviff2xbm(file, image, xbmname, photo_neg)
FILE           *file;
struct xvimage *image;
char           *xbmname;
int            photo_neg;

INPUT

    FILE *file: will contain the X11 bitmap file

    struct xvimage *image: xvimage to convert

    char *xbmname: string (description name)

    int photo_neg: logical, photonegative(0) photopositive(1)

OUTPUT

MODIFICATIONS
Ghosted by Pascal ADAM 14-JUNE-90

DESCRIPTION
viff2xbm takes an viff bitmap image and converts it into a X11 bitmap format commonly known as xbm. The xbm file can be used in conjunction with X resources, such as icons, mouse pointers, stipple paterns, etc. The xbm format is in the form of a C include file, which the user is expected to use when programming with X windows or with such programs as xsetroot (ie. xsetroot -bitmap file.xbm). The following is an example of the kill button from a cantata glyph:
#define kill_width 17
#define kill_height 21
static unsigned char kill_bits[] = {
   0x20, 0x40, 0x00, 0x41, 0x22, 0x00, 0x84, 0x10, 0x00, 0x10, 0x89, 0x00,
   0x80, 0x00, 0x00, 0x50, 0x1a, 0x00, 0x0c, 0x62, 0x00, 0xc0, 0x83, 0x00,
   0xc0, 0x13, 0x00, 0x40, 0x00, 0x00, 0xf0, 0x01, 0x00, 0xf8, 0x03, 0x00,
   0xfc, 0x07, 0x00, 0xfe, 0x0f, 0x00, 0xfe, 0x0f, 0x00, 0xfe, 0x0f, 0x00,
   0xfe, 0x0f, 0x00, 0xfe, 0x0f, 0x00, 0xfc, 0x07, 0x00, 0xf8, 0x03, 0x00,
   0xf0, 0x01, 0x00};

If the input image has more than one band the output xbm file will contain each band as the bitmap name followed by the band number. ie) bitmap1, bitmap2. etc.

SEE ALSO
viff2xbm(1), intro(3), vipl(3), verror(3), vutils(3)

RESTRICTIONS
Input image must be a bit image.

AUTHOR
Mark Young, Mike Lang

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.