Organization of data for XImages

2003-02-15 Thread individual
Hi.

I haven't been able to find a specification of he layout of image data 
that XCreateImage() expects.

My natural instinct is to feed it data as follows. Each row in the 
following scheme represents 1 byte (in the case of a 16bpp image)

[ red Most Significant Byte ]
[ red Least Significant Byte ]
[ green Most Significant Byte ]
[ green Least Significant Byte ]
[ blue Most Significant Byte ]
[ blue Least Significant Byte ]

The above represents one pixel, the top-left hand corner pixel. Next 
pixel would be the one to its left, and so on, completing one scanline.

An alternate data layout would be to have first all the red data for a 
scanline, then all the green data and then all the blue data for the 
scanline.

Would someone please tell me which format XCreateImage() expects?


Thanks.

Paul

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: Organization of data for XImages

2003-02-15 Thread Mark Vojkovich
On Sat, 15 Feb 2003, individual wrote:

 Hi.
 
 I haven't been able to find a specification of he layout of image data 
 that XCreateImage() expects.
 

   The red, green and blue masks within the pixel are in the XImage
structure.  The bits_per_pixel (actual size of each pixel) is also
in there.


Mark.

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel