From f609a16a52f1ac37f1edd297cf1d9e5f2a294724 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Mon, 31 Jan 2022 17:15:21 +0100 Subject: lok: render image preview with lower resolution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit renderShapeSelection callback is used to render image previews which are later used during eg. rotation. Do not render preview with original size which slows down app a lot. Use 1280x720 max. Change-Id: Ia8365a67d87cea869ef74cb70ce4830439a523b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129497 Tested-by: Jenkins Reviewed-by: Szymon Kłos --- desktop/source/lib/init.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'desktop') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index f9b1d3e0ea96..45aa9ad4cbfb 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3953,6 +3953,7 @@ static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu } aMediaDescriptor["SelectionOnly"] <<= true; aMediaDescriptor["OutputStream"] <<= xOut; + aMediaDescriptor["IsPreview"] <<= true; // will down-scale graphics xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList()); -- cgit