The
READ_X11_BITMAP procedure reads bitmaps stored in the
X Windows X11 format. The X Windows
bitmap
program produces a C header file containing the definition of a bitmap produced by that program. This procedure reads such a file and creates an IDL byte array containing the bitmap. It is used primarily to read bitmaps to be used as IDL
widget button labels.
This routine is written in the IDL language. Its source code can be found in the file
read_x11_bitmap.pro
in the
lib
subdirectory of the IDL distribution.
To open and read the X11 bitmap file named
my.x11
in the current directory, store the bitmap in the variable
bitmap1
, and the width and height in the variables
X
and
Y
, enter:
READ_X11_BITMAP, 'my.x11', bitmap1, X, Y
To display the new bitmap, enter: