Can someone give me a list of steps to follow that lead to a properly created XImage?
I am currently getting the WindowAttributes from the root window and passing its Visual* to the XCreateImage() function, while guessing at some of the other values. The image data that I have is for a 24-bit image. I assume that I should put the data into a contiguous char array. Below is the relevant portion of my code...
--------------------------------------
const int DEPTH = 24;
const int WIDTH = 100;
const int HEIGHT = 100;
const int FORMAT = ZPixmap;
const int OFFSET = 0;
const int BITMAP_PAD = 0;
const int BYTES_PER_LINE = (WIDTH * 3);
const int IMAGE_BYTES = WIDTH * HEIGHT * 3;
XWindowAttributes* rootWindowAttributes = new XWindowAttributes;
Visual* visual = rootWindowAttributes->visual;
char* data = new char[IMAGE_BYTES];
XImage* xImage = XCreateImage(display,
visual,
DEPTH,
FORMAT,
OFFSET,
data,
WIDTH,
HEIGHT,
BITMAP_PAD,
BYTES_PER_LINE);
--------------------------------------Josh Davis
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
_______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
