vcl/source/bitmap/BitmapEx.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 796a3e836e5c2379b22e6b73aba5986f406d8c38
Author:     Patrick Luby <guibmac...@gmail.com>
AuthorDate: Wed Jul 17 08:41:30 2024 -0400
Commit:     Patrick Luby <guibomac...@gmail.com>
CommitDate: Sat Jul 27 01:56:32 2024 +0200

    tdf#162062 only apply fix for tdf#161833 if there is a palette
    
    Change-Id: I50d13ed336110eb5e65e99dd5d4a6c6defe6bc50
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170627
    Tested-by: Jenkins
    Reviewed-by: Patrick Luby <guibomac...@gmail.com>
    (cherry picked from commit ee76e5041c79843ef0942c6427d4cd3717820ff6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170655
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx
index 2778a434b390..23a260c9c84b 100644
--- a/vcl/source/bitmap/BitmapEx.cxx
+++ b/vcl/source/bitmap/BitmapEx.cxx
@@ -1309,7 +1309,8 @@ tools::Polygon  BitmapEx::GetContour( bool 
bContourEdgeDetect,
             // causes clipping of any shadows or other semi-transaprent
             // areas in the image. So, instead of testing for fully opaque
             // pixels, treat pixels that are not fully transparent as opaque.
-            const BitmapColor   aTransparent = pAcc->GetBestMatchingColor( 
COL_ALPHA_TRANSPARENT );
+            // tdf#162062 only apply fix for tdf#161833 if there is a palette
+            const BitmapColor   aTransparent = pAcc->GetBestMatchingColor( 
pAcc->HasPalette() ? COL_ALPHA_TRANSPARENT : COL_ALPHA_OPAQUE );
 
             pPoints1.reset(new Point[ nHeight ]);
             pPoints2.reset(new Point[ nHeight ]);

Reply via email to