Re: [PATCH 1/3] d3dx9_36: Add support for DIB file in D3DXGetImageInfoFromFileInMemory. (try 2)

2013-04-23 Thread Christian Costa
2013/4/23 Rico Schüller > On 22.04.2013 23:08, Christian Costa wrote: > >> +typedef struct { >> +DWORD bc2Size; >> +DWORD bc2Width; >> +DWORD bc2Height; >> +WORD bc2Planes; >> +WORD bc2BitCount; >> +DWORD bc2Compression; >> +DWORD bc2SizeImage; >> +DWORD bc2XRes;

Re: [PATCH 1/3] d3dx9_36: Add support for DIB file in D3DXGetImageInfoFromFileInMemory. (try 2)

2013-04-23 Thread Rico Schüller
On 22.04.2013 23:08, Christian Costa wrote: +typedef struct { +DWORD bc2Size; +DWORD bc2Width; +DWORD bc2Height; +WORD bc2Planes; +WORD bc2BitCount; +DWORD bc2Compression; +DWORD bc2SizeImage; +DWORD bc2XRes; +DWORD bc2YRes; +DWORD bc2ClrUsed; +DWORD

Re: [PATCH 1/3] d3dx9_36: Add support for DIB file in D3DXGetImageInfoFromFileInMemory.

2013-04-22 Thread Christian Costa
Wich DIB types ? Are you referring to BI_BITFIELDS compression ? I just looked at windows codecs code and there this code to handle color masks: /* if this is a BITMAPINFOHEADER with BI_BITFIELDS compression, we need to read the extra fields */ if (This->bih.bV5Size == sizeof(BITM

Re: [PATCH 1/3] d3dx9_36: Add support for DIB file in D3DXGetImageInfoFromFileInMemory.

2013-04-22 Thread Alexandre Julliard
Christian Costa writes: > +if (header_size == sizeof(BITMAPINFOHEADER)) > +{ > +BITMAPINFOHEADER *header = (BITMAPINFOHEADER*)*data; > +ULONG count = header->biClrUsed; > + > +if (!count && header->biBitCount <= 8) > +count = 1 << header->biBitCount; >