Dmitry Timoshkov : windowscodecs: Implement QueryCapability of the PNG decoder.
Alexandre Julliard
julliard at winehq.org
Tue Nov 27 14:30:50 CST 2012
Module: wine
Branch: master
Commit: 92d445bcca7c00a3759c84abdecd17763c250b12
URL: http://source.winehq.org/git/wine.git/?a=commit;h=92d445bcca7c00a3759c84abdecd17763c250b12
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Fri Nov 23 11:50:05 2012 +0800
windowscodecs: Implement QueryCapability of the PNG decoder.
---
dlls/windowscodecs/pngformat.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c
index 46a1908..009532d 100644
--- a/dlls/windowscodecs/pngformat.c
+++ b/dlls/windowscodecs/pngformat.c
@@ -351,11 +351,22 @@ static ULONG WINAPI PngDecoder_Release(IWICBitmapDecoder *iface)
return ref;
}
-static HRESULT WINAPI PngDecoder_QueryCapability(IWICBitmapDecoder *iface, IStream *pIStream,
- DWORD *pdwCapability)
+static HRESULT WINAPI PngDecoder_QueryCapability(IWICBitmapDecoder *iface, IStream *stream,
+ DWORD *capability)
{
- FIXME("(%p,%p,%p): stub\n", iface, pIStream, pdwCapability);
- return E_NOTIMPL;
+ HRESULT hr;
+
+ TRACE("(%p,%p,%p)\n", iface, stream, capability);
+
+ if (!stream || !capability) return E_INVALIDARG;
+
+ hr = IWICBitmapDecoder_Initialize(iface, stream, WICDecodeMetadataCacheOnDemand);
+ if (hr != S_OK) return hr;
+
+ *capability = WICBitmapDecoderCapabilityCanDecodeAllImages |
+ WICBitmapDecoderCapabilityCanDecodeSomeImages;
+ /* FIXME: WICBitmapDecoderCapabilityCanEnumerateMetadata */
+ return S_OK;
}
static void user_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
More information about the wine-cvs
mailing list