summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-01-10 12:56:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-01-12 06:52:42 +0000
commit21734247d58a6e915b058d8fa55ece949d049613 (patch)
tree11f0eac0b0efecfae9065fb32313c82f85d75aef /svx
parent7f0b6db955ee52f4216416566e108245f2b3a821 (diff)
drop internal support for 1-bit images
on modern hardware, these are less efficient than regular alpha channels. Also, this greatly simplies the range of stuff that vcl needs to deal with, which will make the upcoming transparency->alpha patch easier to deal with. Enhance vcl::CreateFromData to convert incoming 1-bit data to 8-bit image. Change-Id: I35829da750029fe373d0d2911a669d10bab6ad23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/gallery2/galobj.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrprimitivetools.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 44362b9a78ec..f083ad85bb78 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -313,7 +313,7 @@ SgaObjectSound::SgaObjectSound( const INetURLObject& rURL ) :
if( FileExists( rURL ) )
{
aURL = rURL;
- aThumbBmp = Bitmap(Size(1, 1), vcl::PixelFormat::N1_BPP);
+ aThumbBmp = Bitmap(Size(1, 1), vcl::PixelFormat::N8_BPP);
bIsValid = true;
}
else
diff --git a/svx/source/sdr/primitive2d/sdrprimitivetools.cxx b/svx/source/sdr/primitive2d/sdrprimitivetools.cxx
index 6376fa796086..ff733c0b6e53 100644
--- a/svx/source/sdr/primitive2d/sdrprimitivetools.cxx
+++ b/svx/source/sdr/primitive2d/sdrprimitivetools.cxx
@@ -51,7 +51,7 @@ namespace drawinglayer::primitive2d
r, g, b, 0, r, g, b, 0, r, g, b, 0,
0, 0, 0, a, r, g, b, 0, 0, 0, 0, a
};
- BitmapEx aBitmap = vcl::bitmap::CreateFromData(cross, 3, 3, 12, vcl::PixelFormat::N32_BPP);
+ BitmapEx aBitmap = vcl::bitmap::CreateFromData(cross, 3, 3, 12, /*nBitsPerPixel*/32);
// create and exchange at aRetVal
aRetVal.set(aBitmap);