summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorofftkp <parisoplop@gmail.com>2022-07-16 19:13:13 +0300
committerTomaž Vajngerl <quikee@gmail.com>2022-07-19 13:22:20 +0200
commitf5371a2e5367ab4cb1cd62efb18e46872159a94e (patch)
treeac234ea33f76a13cb8e4fb730843f759327e8a0e /vcl
parenta91d5e5a69682ac857e39f6d015b6c8470273e96 (diff)
Replace old png writer in OpenGLHelper.cxx
Change-Id: I028db48230fae64a539ee0a7964d73c039289740 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137134 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index a0dff4a5f567..b04afad288f3 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -19,7 +19,7 @@
#include <tools/stream.hxx>
#include <config_folders.h>
#include <memory>
-#include <vcl/pngwrite.hxx>
+#include <vcl/filter/PngImageWriter.hxx>
#include <vcl/svapp.hxx>
#include <officecfg/Office/Common.hxx>
#include <com/sun/star/util/XFlushable.hpp>
@@ -531,9 +531,9 @@ void OpenGLHelper::renderToFile(tools::Long nWidth, tools::Long nHeight, const O
glReadPixels(0, 0, nWidth, nHeight, OptimalBufferFormat(), GL_UNSIGNED_BYTE, pBuffer.get());
BitmapEx aBitmap = ConvertBufferToBitmapEx(pBuffer.get(), nWidth, nHeight);
try {
- vcl::PNGWriter aWriter( aBitmap );
SvFileStream sOutput( rFileName, StreamMode::WRITE );
- aWriter.Write( sOutput );
+ vcl::PngImageWriter aWriter( sOutput );
+ aWriter.write( aBitmap );
sOutput.Close();
} catch (...) {
SAL_WARN("vcl.opengl", "Error writing png to " << rFileName);