Comment 9 for bug 261563

Revision history for this message
Alex Samorukov (samm-os2) wrote :

Fix for the wrong bitmap header in non 24-bit modes.

The reason of bug was very simple - authors forgot that bmp data offset should calculated not only like BMPFILEHEADER+BMPINFOHEADER, but also + number of used color in palette * sizeof RGBQUAD. In case of 24 bit bitmap number of used color is always 0 (because we don`t need palette in this case), so it was ok, but not in 1 bit mode.

This patch fix this part of the problem. Another problem is inside ApplayMaskToDIB which return empty file on 64 bit platforms. As workaround it`s possible just to disable it, i see no regression on this.