vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 335ff17176a83abec91dc925a3339e354a1aded8
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Nov 16 10:24:42 2023 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Nov 20 15:53:18 2023 +0100

    tdf#158224 Cannot convert bitmap to polygons
    
    regression from
        commit a76a135c9e9bdecd38970e293e72eeeeca000d27
        Author: Noel Grandin <noelgran...@gmail.com>
        Date:   Tue Jan 3 20:14:21 2023 +0200
        flatten some vcl code
    
    Change-Id: Ibb2a059b283dc2e3bf3fecbf24ff71332a204d5d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159495
    Tested-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    (cherry picked from commit b0c68499ab36d2a1bdf6f1bc7d4cd259b99700e7)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159584
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx 
b/vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx
index 38e2c76794b0..ec4004879651 100644
--- a/vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx
+++ b/vcl/source/bitmap/BitmapSimpleColorQuantizationFilter.cxx
@@ -19,7 +19,7 @@ BitmapEx 
BitmapSimpleColorQuantizationFilter::execute(BitmapEx const& aBitmapEx)
 {
     Bitmap aBitmap = aBitmapEx.GetBitmap();
 
-    if (vcl::numberOfColors(aBitmap.getPixelFormat()) > 
sal_Int64(mnNewColorCount))
+    if (vcl::numberOfColors(aBitmap.getPixelFormat()) <= 
sal_Int64(mnNewColorCount))
         return BitmapEx(aBitmap);
 
     Bitmap aNewBmp;

Reply via email to