The function reads in a file containing a bitmap. The file is parsed in the encoding of the current locale. The ability to read other than the standard format is implementation-dependent. If the file cannot be opened, returns If the file can be opened but does not contain valid bitmap data, it returns If insufficient working storage is allocated, it returns If the file is readable and valid, it returns
returns the bitmap's height and width, as read from the file, to width_return and height_return. It then creates a pixmap of the appropriate size, reads the bitmap data from the file into the pixmap, and assigns the pixmap to the caller's variable bitmap. The caller must free the bitmap using when finished. If name_x_hot and name_y_hot exist, returns them to x_hot_return and y_hot_return; otherwise, it returns -1,-1.
can generate and errors.
The function reads in a file containing a bitmap, in the same manner as but returns the data directly rather than creating a pixmap in the server. The bitmap data is returned in data_return; the client must free this storage when finished with it by calling The status and other return values are the same as for
The function writes a bitmap out to a file in the X Version 11 format. The name used in the output file is derived from the file name by deleting the directory prefix. The file is written in the encoding of the current locale. If the file cannot be opened for writing, it returns If insufficient memory is allocated, returns otherwise, on no error, it returns If x_hot and y_hot are not -1, -1, writes them out as the hotspot coordinates for the bitmap.
can generate and errors.
The function creates a pixmap of the given depth and then does a bitmap-format of the data into it. The depth must be supported by the screen of the specified drawable, or a error results.
can generate and errors.
The function allows you to include in your C program (using a bitmap file that was written out by (X version 11 format only) without reading in the bitmap file. The following example creates a gray bitmap:
#include "gray.bitmap"
Pixmap bitmap; bitmap = XCreateBitmapFromData(display, window, gray_bits, gray_width, gray_height);
If insufficient working storage was allocated, returns It is your responsibility to free the bitmap using when finished.
can generate a error.