From e50ff311ceda513fdcff4b73546d039bb847a0b9 Mon Sep 17 00:00:00 2001 From: offtkp Date: Sat, 16 Jul 2022 19:08:22 +0300 Subject: Replace old png writer in QtTools.cxx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4f6438b811e7e97aedda90508423982cb82e0008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137131 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- vcl/qt5/QtTools.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'vcl/qt5') diff --git a/vcl/qt5/QtTools.cxx b/vcl/qt5/QtTools.cxx index f9a0a0e0e328..030b3af2b5a3 100644 --- a/vcl/qt5/QtTools.cxx +++ b/vcl/qt5/QtTools.cxx @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include @@ -111,8 +111,9 @@ QImage toQImage(const Image& rImage) if (!!rImage) { SvMemoryStream aMemStm; - vcl::PNGWriter aWriter(rImage.GetBitmapEx()); - aWriter.Write(aMemStm); + auto rBitmapEx = rImage.GetBitmapEx(); + vcl::PngImageWriter aWriter(aMemStm); + aWriter.write(rBitmapEx); aImage.loadFromData(static_cast(aMemStm.GetData()), aMemStm.TellEnd()); } -- cgit