vcl/source/filter/png/PngImageReader.cxx | 2 +- vcl/source/filter/png/PngImageWriter.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit d3cd09eae495de899523f4e85463ba55365395c3 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Sep 11 09:23:55 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Sep 11 13:02:14 2025 +0200 PNG_COLOR_TYPE_RGB_ALPHA and PNG_COLOR_TYPE_RGBA are the same thing use one consistently Change-Id: Ie36fb9e30c5d82e435ee3d245d0ad3d132a15e65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190796 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/vcl/source/filter/png/PngImageReader.cxx b/vcl/source/filter/png/PngImageReader.cxx index 82d1827543bd..f89e3cc6db12 100644 --- a/vcl/source/filter/png/PngImageReader.cxx +++ b/vcl/source/filter/png/PngImageReader.cxx @@ -457,7 +457,7 @@ bool reader(SvStream& rStream, ImportOutput& rImportOutput, case PNG_COLOR_TYPE_RGB: aBitmap = Bitmap(Size(width, height), vcl::PixelFormat::N24_BPP); break; - case PNG_COLOR_TYPE_RGBA: + case PNG_COLOR_TYPE_RGB_ALPHA: aBitmap = Bitmap(Size(width, height), vcl::PixelFormat::N32_BPP); break; case PNG_COLOR_TYPE_GRAY: diff --git a/vcl/source/filter/png/PngImageWriter.cxx b/vcl/source/filter/png/PngImageWriter.cxx index da0dde32f93a..b0eb6ec0fb0e 100644 --- a/vcl/source/filter/png/PngImageWriter.cxx +++ b/vcl/source/filter/png/PngImageWriter.cxx @@ -208,7 +208,7 @@ static bool pngWrite(SvStream& rStream, const Graphic& rGraphic, int nCompressio case ScanlineFormat::N32BitTcBgra: { assert(aBitmap.HasAlpha()); - colorType = PNG_COLOR_TYPE_RGBA; + colorType = PNG_COLOR_TYPE_RGB_ALPHA; bitDepth = 8; bCombineChannels = true; break; @@ -224,7 +224,7 @@ static bool pngWrite(SvStream& rStream, const Graphic& rGraphic, int nCompressio case ScanlineFormat::N32BitTcRgba: { assert(aBitmap.HasAlpha()); - colorType = PNG_COLOR_TYPE_RGBA; + colorType = PNG_COLOR_TYPE_RGB_ALPHA; bitDepth = 8; bCombineChannels = true; break;