diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2019-12-28 20:53:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-29 19:00:53 +0100 |
commit | 50c302a280763968d1bc01f2fc7bd38dd463bb79 (patch) | |
tree | 58d803863c7f17d4ddcbb24367ec56d7760d93a3 /vcl/source | |
parent | f1656f7db9c0e00b1c9907d382a3e5e4cbdc5edd (diff) |
support converting images to 32-bit
not sure where this is coming from, but without it, I see
warning messages about bitmaps having the wrong depth
Change-Id: Iee1a68ced73333a22b811dc31afb32df14709f18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85946
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 68d590bc6eeb..0ee707089f26 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -305,6 +305,15 @@ bool Bitmap::Convert( BmpConversion eConversion ) } break; + case BmpConversion::N32Bit: + { + if( nBitCount < 32 ) + bRet = ImplConvertUp( 32 ); + else + bRet = true; + } + break; + case BmpConversion::Ghosted: bRet = ImplConvertGhosted(); break; @@ -884,6 +893,11 @@ void Bitmap::AdaptBitCount(Bitmap& rNew) const rNew.Convert(BmpConversion::N24Bit); break; } + case 32: + { + rNew.Convert(BmpConversion::N32Bit); + break; + } default: { SAL_WARN("vcl", "BitDepth adaptation failed, from " << rNew.GetBitCount() << " to " << GetBitCount()); |