[3/5] d3dx9: Implement D3DXSaveSurfaceToFileW.
hverbeet at gmail.com
Thu May 3 08:56:27 CDT 2012
On 3 May 2012 15:48, Józef Kucia <joseph.kucia at gmail.com> wrote:
> Thanks for the review.
> On Thu, May 3, 2012 at 1:08 PM, Henri Verbeet <hverbeet at gmail.com> wrote:
>>> + memcpy(&wic_pixel_format, pixel_format_guid, sizeof(GUID));
>>> + hr = IWICBitmapFrameEncode_SetPixelFormat(frame, &wic_pixel_format);
>>> + d3d_pixel_format = wic_guid_to_d3dformat(&wic_pixel_format);
>> What is all this for?
> If a WIC bitmap encoder doesn't support a given pixel format, it
> returns the closest supported pixel format.
Right, make sense.
>> Also, how do you intend to implement D3DXSaveSurfaceToFileInMemory()?
> It can be implemented by renaming D3DXSaveSurfaceToFileW() to
> D3DXSaveSurfaceToFileInMemory(), and making it to use IStream which
> uses the memory storage. Then, D3DXSaveSurfaceToFileW() will just call
> D3DXSaveSurfaceToFileInMemory() and write the returned buffer to a
> Do I have to implement D3DXSaveSurfaceToFileInMemory() first?
Not necessarily, but it's probably just as easy to start with that one.
More information about the wine-devel