[2/2] windowscodecs: Implement CreateBitmapFromHICON, based on a gdiplus implementation.

Dmitry Timoshkov dmitry at baikal.ru
Fri Jan 11 11:39:54 CST 2013


Vincent Povirk <madewokherd at gmail.com> wrote:

> You appear to be leaking the IWICBitmapLock object.

Yeah, it's an omission on my part, thanks.

> Also, it seems odd that you're using the buffer AND IWICBitmapLock. I
> assume the point of passing a buffer to BitmapImpl_Create (and wasting
> a bit of time/memory) was to avoid IWICBitmapLock.

BitmapImpl_Create creates its own internal buffer for a WIC bitmap bits,
while 'buffer' is used to store GDI bitmap bits. The only way to access
WIC bitmap bits from ComponentFactory is using IWICBitmapLock (to not
break the object separation/implementation detail rules). And 'buffer'
is reused twice: once for GDI image bits, and next time for the GDI mask
bits.

-- 
Dmitry.



More information about the wine-devel mailing list