[PATCH 2/3] windowscodecs: Add 32bppRGBA to 32bppBGRA copy.

Jan Sikorski jsikorski at codeweavers.com
Thu Oct 22 08:07:28 CDT 2020


---
 dlls/windowscodecs/converter.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c
index bf2ed9d74f0..bc10a9eccc4 100644
--- a/dlls/windowscodecs/converter.c
+++ b/dlls/windowscodecs/converter.c
@@ -722,6 +722,15 @@ static HRESULT copypixels_to_32bppBGRA(struct FormatConverter *This, const WICRe
                     pbBuffer[cbStride*y+4*x+3] = 0xff;
         }
         return S_OK;
+    case format_32bppRGBA:
+        if (prc)
+        {
+            HRESULT res;
+            res = IWICBitmapSource_CopyPixels(This->source, prc, cbStride, cbBufferSize, pbBuffer);
+            if (FAILED(res)) return res;
+            reverse_bgr8(4, pbBuffer, prc->Width, prc->Height, cbStride);
+        }
+        return S_OK;
     case format_32bppBGRA:
         if (prc)
             return IWICBitmapSource_CopyPixels(This->source, prc, cbStride, cbBufferSize, pbBuffer);
-- 
2.27.0




More information about the wine-devel mailing list