BUG: TDib does not handle correctly some bitmaps ([bugs:#650]).
Documented in [bugs:#650].
TDib does not handle correctly some bitmaps
Ok, problem identified. The core issue is that the biSizeImage member of BITMAPINFOHEADER struct is set to 0. Which, according to the documentation, is fine for uncompressed RGB bitmaps. But the TDib class does not handle that well. As a matter of fact, when loading a bitmap from a file, there is code that calculates the size. But when the bitmap is loaded from a resource, that code is not executed, and the size is zero. I suspect the issue may be in the ResToMemHandle method, where the bitmap is...
One difference that I see is that for the new bitmpas, in the BITMAPINFOHEADER the members biXPelsPerMeter and biYPelsPerMeter are set to 3780, while for the other bitmaps, that show fine in the toolbar, they are 0.
Strange - when using the new bitmaps in a control bar, they show as garbage. In the menus they show fine.
Merged [r8855] and [r8856] from branches/owlet:
OWLMaker crashes when creating non-existing file from the MRU list