vcl/source/bitmap/bitmap.cxx | 3 +++ 1 file changed, 3 insertions(+) New commits: commit 24a0b1b766b9a7650f90c8e5ab40f11f9c7fa3e2 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Aug 1 15:28:11 2025 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Aug 1 20:22:23 2025 +0200
improve Bitmap::SplitIntoColorAndAlpha which was not preserving the pref size and mapmode Change-Id: Id9a8ebac21c2ea572c93cd0254dcea6cbca17b29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188771 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index 84ab68fce34c..c6c04d48229d 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -1797,7 +1797,10 @@ std::pair<Bitmap, AlphaMask> Bitmap::SplitIntoColorAndAlpha() const { assert(getPixelFormat() == vcl::PixelFormat::N32_BPP && "only valid to call this when this is a 32-bit combined color+alpha bitmap"); Bitmap aColorBmp(GetSizePixel(), vcl::PixelFormat::N24_BPP); + aColorBmp.SetPrefSize(GetPrefSize()); + aColorBmp.SetPrefMapMode(GetPrefMapMode()); AlphaMask aAlphaBmp(GetSizePixel()); + aAlphaBmp.SetPrefMapMode(GetPrefMapMode()); // We will probably need to make this more efficient by pushing it down to the *SalBitmap implementations, // but for now, do the simple and safe thing.