vcl/source/filter/igif/gifread.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit b2ca39bc5e424e67e8fc7e8a044214feb09e39f7
Author:     Patrick Luby <plub...@neooffice.org>
AuthorDate: Fri Oct 6 15:21:50 2023 -0400
Commit:     Patrick Luby <plub...@neooffice.org>
CommitDate: Fri Oct 6 22:31:00 2023 +0200

    tdf#157576 and tdf#157635 mask out black pixels
    
    Due to the switch from transparency to alpha in commit
    81994cb2b8b32453a92bcb011830fcb884f22ff3, mask out black
    pixels in bitmap.
    
    Change-Id: I7cc8c39c20d8ec4fed026c3e27fce24396815d68
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157665
    Tested-by: Jenkins
    Reviewed-by: Patrick Luby <plub...@neooffice.org>

diff --git a/vcl/source/filter/igif/gifread.cxx 
b/vcl/source/filter/igif/gifread.cxx
index 818317f8baa8..afbf084f4f31 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -666,7 +666,13 @@ void GIFReader::CreateNewBitmaps()
         aAnimationFrame.maBitmapEx = BitmapEx( aBmp8, aAlphaMask );
     }
     else
-        aAnimationFrame.maBitmapEx = BitmapEx( aBmp8 );
+    {
+        // tdf#157576 and tdf#157635 mask out black pixels
+        // Due to the switch from transparency to alpha in commit
+        // 81994cb2b8b32453a92bcb011830fcb884f22ff3, mask out black
+        // pixels in bitmap.
+        aAnimationFrame.maBitmapEx = BitmapEx( aBmp8, aBmp8 );
+    }
 
     aAnimationFrame.maPositionPixel = Point( nImagePosX, nImagePosY );
     aAnimationFrame.maSizePixel = Size( nImageWidth, nImageHeight );

Reply via email to