mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 14:43:45 +00:00
[USER32]
- Fix is_dib_monochrome for bitmaps using BITMAPCOREINFO. Patch by Mark Jansen. CORE-10889 svn path=/trunk/; revision=71063
This commit is contained in:
parent
6da01fa019
commit
677a03e5af
1 changed files with 4 additions and 2 deletions
|
@ -117,12 +117,12 @@ static int get_dib_image_size( int width, int height, int depth )
|
|||
|
||||
static BOOL is_dib_monochrome( const BITMAPINFO* info )
|
||||
{
|
||||
if (info->bmiHeader.biBitCount != 1) return FALSE;
|
||||
|
||||
if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
|
||||
{
|
||||
const RGBTRIPLE *rgb = ((const BITMAPCOREINFO*)info)->bmciColors;
|
||||
|
||||
if (((const BITMAPCOREINFO*)info)->bmciHeader.bcBitCount != 1) return FALSE;
|
||||
|
||||
/* Check if the first color is black */
|
||||
if ((rgb->rgbtRed == 0) && (rgb->rgbtGreen == 0) && (rgb->rgbtBlue == 0))
|
||||
{
|
||||
|
@ -138,6 +138,8 @@ static BOOL is_dib_monochrome( const BITMAPINFO* info )
|
|||
{
|
||||
const RGBQUAD *rgb = info->bmiColors;
|
||||
|
||||
if (info->bmiHeader.biBitCount != 1) return FALSE;
|
||||
|
||||
/* Check if the first color is black */
|
||||
if ((rgb->rgbRed == 0) && (rgb->rgbGreen == 0) &&
|
||||
(rgb->rgbBlue == 0) && (rgb->rgbReserved == 0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue