Hans Leidekker : windowscodecs: Implement IWICColorContext::GetProfileBytes .

Alexandre Julliard julliard at winehq.org
Thu Nov 15 15:26:31 CST 2012


Module: wine
Branch: master
Commit: ffa558bbaa3f28dd9c50222fadcdeaadbf9a3902
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ffa558bbaa3f28dd9c50222fadcdeaadbf9a3902

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu Nov 15 14:09:15 2012 +0100

windowscodecs: Implement IWICColorContext::GetProfileBytes.

---

 dlls/windowscodecs/colorcontext.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dlls/windowscodecs/colorcontext.c b/dlls/windowscodecs/colorcontext.c
index ba23387..5434fc6 100644
--- a/dlls/windowscodecs/colorcontext.c
+++ b/dlls/windowscodecs/colorcontext.c
@@ -151,8 +151,18 @@ static HRESULT WINAPI ColorContext_GetType(IWICColorContext *iface,
 static HRESULT WINAPI ColorContext_GetProfileBytes(IWICColorContext *iface,
     UINT cbBuffer, BYTE *pbBuffer, UINT *pcbActual)
 {
-    FIXME("(%p,%u,%p,%p)\n", iface, cbBuffer, pbBuffer, pcbActual);
-    return E_NOTIMPL;
+    ColorContext *This = impl_from_IWICColorContext(iface);
+    TRACE("(%p,%u,%p,%p)\n", iface, cbBuffer, pbBuffer, pcbActual);
+
+    if (This->type != WICColorContextProfile)
+        return WINCODEC_ERR_NOTINITIALIZED;
+
+    if (cbBuffer >= This->profile_len && pbBuffer)
+        memcpy(pbBuffer, This->profile, This->profile_len);
+
+    *pcbActual = This->profile_len;
+
+    return S_OK;
 }
 
 static HRESULT WINAPI ColorContext_GetExifColorSpace(IWICColorContext *iface,




More information about the wine-cvs mailing list