vcl/source/filter/png/PngImageWriter.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 31c520c9e7645bfcebe7ab9c64291bbd8ed84774
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Sep 3 08:26:49 2025 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Wed Sep 3 10:06:11 2025 +0200

    fix bug in pngWrite
    
    bug was introduced in
        commit 62f62a3b12706b1a4ce8abc2e0bc0fdb7ddfa9fe
        Author: Noel Grandin <[email protected]>
        Date:   Thu Aug 7 15:26:56 2025 +0200
        BitmapEx->Bitmap in PngImageWriter
    
    but only started showing up after
        commit 18b488deededee4b62b3c041c8db84452ad72b55 (HEAD)
        Author: Noel Grandin <[email protected]>
        Date:   Tue Aug 26 21:26:33 2025 +0200
        Make Bitmap::HasAlpha() more reliable
    
    and even then, only on my local macOS build.
    
    Change-Id: Ia0d4f7fdbca6cf93f9f7da13eb5e882d088f3e48
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190548
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/vcl/source/filter/png/PngImageWriter.cxx 
b/vcl/source/filter/png/PngImageWriter.cxx
index 106e4916e60c..455c1c1710f9 100644
--- a/vcl/source/filter/png/PngImageWriter.cxx
+++ b/vcl/source/filter/png/PngImageWriter.cxx
@@ -227,6 +227,7 @@ static bool pngWrite(SvStream& rStream, const Graphic& 
rGraphic, int nCompressio
                 assert(!aBitmap.HasAlpha());
                 colorType = PNG_COLOR_TYPE_RGBA;
                 bitDepth = 8;
+                png_set_bgr(pPng);
                 break;
             }
             case ScanlineFormat::N32BitTcRgba:

Reply via email to