summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2024-07-17 08:41:30 -0400
committerPatrick Luby <guibomacdev@gmail.com>2024-07-17 21:36:48 +0200
commitee76e5041c79843ef0942c6427d4cd3717820ff6 (patch)
tree0488a5354b67488d4d7f53baaa3288a1daf22732 /vcl
parent0c6642ed3a2dbcd54456f61706606fa3371b70ba (diff)
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 <guibomacdev@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/bitmap/BitmapEx.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx
index 21b5969c25ec..9f4bd7f47b2f 100644
--- a/vcl/source/bitmap/BitmapEx.cxx
+++ b/vcl/source/bitmap/BitmapEx.cxx
@@ -1354,7 +1354,8 @@ tools::Polygon BitmapEx::GetContour( bool bContourEdgeDetect,
// causes clipping of any shadows or other semi-transparent
// 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 ]);