GDI DIB Engine Failing in 24 Bits Per Pixel Color

Harold L Hunt II
Wed Jan 22 19:11:00 GMT 2003

I need a little help here.  The GDI DIB engine (specified with the -engine 1
parameter and used automatically by the -multiwindow mode) is crashing when
running on a Windows display set to 24 bit color.  The GDI DIB engine works
fine when running on Windows displays set to either 16 or 32 bit color.

I recall seeing somewhere that the GDI DIB documentation is wrong when it
comes to 24 bit DIBs and that instead of the pixels being packed, they are
actually aligned on 32 bit word boundaries, just like a 32 bit DIB.  Am I
crazy?  Did I just dream seeing this?  I am suspecting that this might be
the case because this would mean that I am not allocating enough space for
the DIB memory, which would probably cause a crash when we try to blit
portions of that memory that do not exist... but I could be wrong.
Actually, I am going to test that out later by just blitting to all sections
of the DIB, to make sure that all of its memory is valid.

I thought that the problem lay in the parameters that we pass to X to tell
it about our screen: width, height, depth, bits per pixel, bits per rgb, and
the color masks.  However, so far I have found no diference in the way that
the GDI engine handles 32 bits per pixel and 24 bits per pixel.  I have also
found no difference in how the GDI and DirectDraw engines handle 24 bits per
pixel color.

So, I am stuck for now... if anyone has any deep insight, be sure to share
it with me.



More information about the Cygwin-xfree mailing list