Jan Sikorski : windowscodecs: Add 32bppRGBA to 32bppBGRA copy.

Alexandre Julliard julliard at winehq.org
Fri Oct 23 14:27:19 CDT 2020


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

Author: Jan Sikorski <jsikorski at codeweavers.com>
Date:   Thu Oct 22 15:07:28 2020 +0200

windowscodecs: Add 32bppRGBA to 32bppBGRA copy.

Signed-off-by: Esme Povirk <esme at codeweavers.com>
Signed-off-by: Jan Sikorski <jsikorski at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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);




More information about the wine-cvs mailing list