[PATCH] windowscodecs: Add support for DIB format.

Vincent Povirk madewokherd at gmail.com
Mon Jan 21 11:00:13 CST 2013


If there's really a demand for using native windowscodecs without
breaking d3dx9 (which already happens because of the TGA decoder), I
can supply a win32 build of our WIC extensions that winetricks could
install with it. I can't do anything about ICNS.

>> Yes, there are other ways we could do this. Probably GDI is the next
>> simplest way. However, this is a case where we can very easily reuse
>> code that was already written to support the BMP and ICO decoders as
>> well as the code in d3dx9 that uses WIC decoders, so to me it still
>> seems like the best option.
>
> Personally I don't see why DIB handling needs a WIC codec in the first
> place, GDI supports it just fine.

Sure, but we ALREADY HAVE CODE for packed dibs that was essentially
free and that is currently maintained. To do this from GDI, we still
have to write code in d3dx9 that parses the packed DIB enough that we
can pass it so some GDI function, then write code that converts a GDI
bitmap to a D3DX surface. It gets a little more complicated when you
consider things like palettes and rle encoding.

>> (I was setting up for this when I was working on the ICO decoder, but
>> that was only a matter of keeping separate the two changes I had to
>> make in the logic for reading ICO frames, and writing
>> DibDecoder_CreateInstance so anyone who went to implement a new one
>> would see it.)
>
> The ICO decoder probably could be replaced by CreateBitmapFromHICON
> on the client side, since the latter one is implemented now. For other
> cases CreateBitmapFromHBITMAP or CreateBitmapFromMemory should work.

So now we need code in WIC that copies ICO streams into a file on disk
so we can get an HICON for the bitmap frames (they could all be PNG)
so we can pass that to CreateBitmapFromHICON? No thanks.



More information about the wine-devel mailing list