include/vcl/bitmap.hxx | 1 + vcl/source/gdi/bitmap3.cxx | 14 ++++++++++++++ 2 files changed, 15 insertions(+)
New commits: commit 50c302a280763968d1bc01f2fc7bd38dd463bb79 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sat Dec 28 20:53:02 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Dec 29 19:00:53 2019 +0100 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.gran...@collabora.co.uk> diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index 3d57e5dfe741..329a40ec6ef1 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -71,6 +71,7 @@ enum class BmpConversion N8BitGreys, N8BitColors, N24Bit, + N32Bit, N8BitTrans, Ghosted }; 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()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits