vcl/source/bitmap/BitmapEx.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit ee76e5041c79843ef0942c6427d4cd3717820ff6 Author: Patrick Luby <[email protected]> AuthorDate: Wed Jul 17 08:41:30 2024 -0400 Commit: Patrick Luby <[email protected]> CommitDate: Wed Jul 17 21:36:48 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 <[email protected]> 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 ]);
