summaryrefslogtreecommitdiff
path: root/vcl/source/bitmap
diff options
context:
space:
mode:
authorParis Oplopoios <paris.oplopoios@collabora.com>2023-06-10 21:33:39 +0300
committerParis Oplopoios <parisoplop@gmail.com>2023-06-11 01:13:39 +0200
commit7588c1f33cdaab58a6b84f4f4e75922c5d4a8a7f (patch)
tree924b53304567d36acb2fc8e5e5ba801a1a648537 /vcl/source/bitmap
parent8bcdda7e18148a7f4e15bbec0bd0550355b7bd8d (diff)
tdf#154168 Export no transparency PNGs correctly
When bTranslucent was false the function would simply return, causing a 0 byte png. Now we just remove the alpha channel. Change-Id: Ie2578185ac12fb38b6f1b674758e564721e3973f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152840 Tested-by: Jenkins Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
Diffstat (limited to 'vcl/source/bitmap')
-rw-r--r--vcl/source/bitmap/BitmapEx.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx
index af712a0561a5..ad4adca6319e 100644
--- a/vcl/source/bitmap/BitmapEx.cxx
+++ b/vcl/source/bitmap/BitmapEx.cxx
@@ -190,6 +190,11 @@ void BitmapEx::Clear()
SetEmpty();
}
+void BitmapEx::ClearAlpha()
+{
+ maAlphaMask.SetEmpty();
+}
+
bool BitmapEx::IsAlpha() const
{
return !maAlphaMask.IsEmpty();