Pixmap XCreateBitmapFromData(display, d, data, width, height)
Display *display;
Drawable d;
char *data;
unsigned int width, height;
display | Specifies the connection to the X server. |
d | Specifies the drawable that indicates the screen. |
data | Specifies the location of the bitmap data. |
width height | Specify the width and height. |
#include "gray.bitmap"
Pixmap bitmap;
bitmap = XCreateBitmapFromData(display, window, gray_bits, gray_width, gray_height);
If insufficient working storage was allocated, XCreateBitmapFromData() returns None. It is your responsibility to free the bitmap using XFreePixmap() when finished.
XCreateBitmapFromData() can generate a BadAlloc and BadGC errors.
BadAlloc | The server failed to allocate the requested source or server memory. |
BadGC | A value for a GContext argument does not name a defined GContext. |