[winGRASS] XImage structure in libG11

Mike Thomas miketh at brisbane.paradigmgeo.com
Thu Dec 6 01:51:13 EST 2001


Hi again.

Further thoughts for other programmers working on libG11:

The libG11 XImage format and associated functions deal roughly (or not at
all) with scan line alignment on storage unit boundaries, and other aspects
of the XImage structure.

At the moment I have put a check into XPutImage() to non-destructively
convert XImage bitmaps so that each scan line is padded at the end to a LONG
boundary as required by our friend SetDIBitsToDevice(), based on the width
argument and the current assumed bitmap pixel size of 24 bits.

As I was experimenting with the pixel size, there is also a new macro in
xlib.c for internal use only:

/*Hard wire number of bytes per pixel in an XImage*/
#define XIMAGEBYTEDEPTH 3

which replaces all XImage pixel size references (formerly 3's at various
places in the code).

Cheers

Mike Thomas




More information about the grass-windows mailing list