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:
READ_X11_BITMAP, 'my.x11', image, /EXPAND_TO_BYTES
TV, image, /ORDER
READ_X11_BITMAP, File, Bitmap [, X, Y] [, /EXPAND_TO_BYTES]
A scalar string containing the name of the file containing the bitmap.
A named variable that will contain the bitmap. This variable is returned as a byte array.
A named variable that will contain the width of the bitmap.
A named variable that will contain the height of the bitmap.
Set this keyword to instruct READ_X11_BITMAP to return a 2-D array which has one bit per byte (0 for a 0 bit, 255 for a 1 bit) instead.