7 Sep
2004
7 Sep
'04
1:07 a.m.
"Huw D M Davies" <h.davies1(a)physics.ox.ac.uk> wrote:
+ /* Need to check if the bitmap is monochrome, and if the + two colors are really black and white */ + if (is_dib_monochrome(pbi)) + { + /* Top-down DIBs have a negative height */ + DWORD height = pbi->bmiHeader.biHeight; + if (height < 0) height = -height;
[skipped]
+ /* If it's possible, create a monochrome bitmap */ + + DWORD height = fix_info->bmiHeader.biHeight; + if (height < 0) height = -height;
In the code above 'DWORD height' should be changed to 'LONG height' otherwise the test 'height < 0' will always fail. -- Dmitry.