Read and write XBM images.
|gdImagePtr gdImageCreateFromXbm(||FILE ||*||fd||)|
gdImageCreateFromXbm is called to load images from X bitmap format files. Invoke gdImageCreateFromXbm with an already opened pointer to a file containing the desired image. gdImageCreateFromXbm returns a gdImagePtr to the new image, or NULL if unable to load the image (most often because the file is corrupt or does not contain an X bitmap format image). gdImageCreateFromXbm does not close the file.
You can inspect the sx and sy members of the image to determine its size. The image must eventually be destroyed using gdImageDestroy.
X11 X bitmaps (which define a char) as well as X10 X bitmaps (which define a short) are supported.
A pointer to the new image or NULL if an error occurred.
in = fopen("myxbm.xbm", "rb");
im = gdImageCreateFromXbm(in);
// ... Use the image ...
|void gdImageXbmCtx(||gdImagePtr ||image,|
Writes an image to an IO context in X11 bitmap format.
|image||The gdImagePtr to write.|
|file_name||The prefix of the XBM’s identifiers. Illegal characters are automatically stripped.|
|gd||Which color to use as forground color. All pixels with another color are unset.|
|out||The gdIOCtx to write the image file to.|