GetDIBits(): Handle Bitfields properly
Michael Kaufmann
hallo at michael-kaufmann.ch
Sun Apr 15 04:45:44 CDT 2007
>> + if (bpp > 0 && compr == BI_BITFIELDS)
>> + {
>> + /* Windows ignores the input bitfields and overwrites them */
>> +
>> + if (bpp == 16)
>> + {
>> + /* With these bitfields, the color data is the same as
>> for BI_RGB */
>> + ((PDWORD)info->bmiColors)[0] = 0x7c00;
>> + ((PDWORD)info->bmiColors)[1] = 0x03e0;
>> + ((PDWORD)info->bmiColors)[2] = 0x001f;
>> + }
>> + else if (bpp == 32)
>> + {
>> + /* With these bitfields, the color data is the same as
>> for BI_RGB */
>> + ((PDWORD)info->bmiColors)[0] = 0xff0000;
>> + ((PDWORD)info->bmiColors)[1] = 0x00ff00;
>> + ((PDWORD)info->bmiColors)[2] = 0x0000ff;
>> + }
>
> What happens in 15 and 24 bpp cases?
In theory, bitfields are not possible for 24 bpp modes - I'll add a test
for this. Do you have any information about the 15 bpp case? Are some
applications using this value? According to MSDN, it is not allowed.
Regards
Michael
More information about the wine-devel
mailing list