lxbm2viff(3)

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

LIBRARY CALL
#include "vinclude.h"
int
lxbm2viff(file, newimage, photo_neg)
FILE    *file;
struct  xvimage **newimage;
int     photo_neg;

INPUT

    FILE *file: X11 image file.

    struct xvimage **newimage: will return the VIFF image.

    int photo_neg: Determines if photonegative or photopositive

OUTPUT

    struct xvimage **newimage: will return the VIFF image.

MODIFICATIONS
Ghosted by Pascal ADAM 14-JUNE-90

DESCRIPTION
xbm2viff takes an X11 bitmap file (xbm) and converts it into an viff bitmap image. The xbm file is 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};

Other examples of X11 bitmap files (xbm) can be found in $KHOROS_HOME/data/bitmaps.

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

RESTRICTIONS
Only the first bitmap definition is taken, the rest are ignored.

AUTHOR
Mark Young

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