int XpmCreateImageFromBuffer(Display *display, char *buffer, XImage **image_return, XImage **shapeimage_return, XpmAttributes *attributes) { XpmImage image; XpmInfo info; int ErrorStatus; /* create an XpmImage from the buffer */ if (attributes) { xpmInitAttributes(attributes); xpmSetInfoMask(&info, attributes); ErrorStatus = XpmCreateXpmImageFromBuffer(buffer, &image, &info); } else ErrorStatus = XpmCreateXpmImageFromBuffer(buffer, &image, NULL); if (ErrorStatus != XpmSuccess) return (ErrorStatus); /* create the related ximages */ ErrorStatus = XpmCreateImageFromXpmImage(display, &image, image_return, shapeimage_return, attributes); if (attributes) { if (ErrorStatus >= 0) /* no fatal error */ xpmSetAttributes(attributes, &image, &info); XpmFreeXpmInfo(&info); } /* free the XpmImage */ XpmFreeXpmImage(&image); return (ErrorStatus); }
int qxe_XpmCreateXpmImageFromBuffer (char *buffer, XpmImage *image, XpmInfo *info) { return XpmCreateXpmImageFromBuffer (buffer, image, info); }