[2/3] gdiplus: If a 32-bit dib is selected in an hdc, use the dib directly.
Vincent Povirk
madewokherd at gmail.com
Tue Dec 4 09:54:13 CST 2012
>>> you won't get a negative height with GetObject,
>>
>> Hmm, is GdipCreateBitmapFromHBITMAP doing it right, then? It assumes
>> all DIB objects have positive stride.
>
> No, that's wrong. It should most likely just do a GetDIBits (in one go,
> not line by line like it currently does).
Does that mean there's no way to access the bits directly given a DIB object?
I think we do it line by line so that we don't rely on
GdipCreateBitmapFromScan0 to create the bitmap with a particular
stride. I guess we could specify a stride when calling that.
>>> you won't get DIB info at all for DDBs.
>>
>> I don't think it makes sense to do this for DDBs, as I can't draw them
>> directly and don't expect them to have alpha information.
>
> Sure, but it shouldn't crash and burn.
I don't understand why it would. I'd expect the GetObject to fail
given sizeof(DIBSECTION) if the object is a DDB.
More information about the wine-devel
mailing list