|gdImagePtr gdImageCreateFromXpm(||char ||*||filename||)|
gdImageCreateFromXbm is called to load images from XPM X Window System color bitmap format files. This function is available only if HAVE_XPM is selected in the Makefile and the Xpm library is linked with the application. Unlike most gd file functions, the Xpm functions require filenames, not file pointers. gdImageCreateFromXpm 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 XPM bitmap format image). You can inspect the sx and sy members of the image to determine its size. The image must eventually be destroyed using gdImageDestroy.
|filename||The input filename (not FILE pointer)|
A pointer to the new image or NULL if an error occurred.
in = fopen("myxpm.xpm", "rb");
im = gdImageCreateFromXpm(in);
// ... Use the image ...