xi = XReadScreen(disp, window, 0, 0, width, height, False);
xi = xreadscreen(disp, window, 0, 0, width, height, False);
XImage *XCreateImage_wr(Display *disp, Visual *visual, unsigned int depth,    int format, int offset, char *data, unsigned int width,    unsigned int height, int bitmap_pad, int bytes_per_line) {/* * This is a kludge to get a created XImage to exactly match what * XReadScreen returns: we noticed the rgb masks are different from * XCreateImage with the high color visual (red mask <-> blue mask). * Note we read from the root window(!) then free the data. */#ifdef SOLARIS	if (overlay) {		XImage *xi;		xi = XReadScreen(disp, window, 0, 0, width, height, False);		if (xi == NULL) {			return xi;		}		if (xi->data != NULL) {			free(xi->data);		}		xi->data = data;		return xi;	}#endif	return XCreateImage(disp, visual, depth, format, offset, data,	    width, height, bitmap_pad, bytes_per_line);}