Re: RESEND: CreateDIBitmap: Don't create monochrome bitmaps
6 Sep
2004
6 Sep
'04
8:07 p.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.
7768
Age (days ago)
7768
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov