diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2022-11-21 15:23:59 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2022-11-25 08:01:20 +0100 |
commit | a5c1cbcbb506e1c33c7e80673bfc01a34c834ed5 (patch) | |
tree | ddc22c91660d2ef960c71d128458484cf41d0276 /include | |
parent | 24d7431876e87eba700a9f141dc8e030143a92ad (diff) |
pdfium: reduce size if cannot create bitmap
In files with large pages it was rendering white, empty
content. That was because bitmap creation in the PDFium
failed. This reduces the size to possible value.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I093a6aff94104cdc8223d7b8cbc00ff9217021b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143037
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143243
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/filter/PDFiumLibrary.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx index 7b319a727259..347b64619045 100644 --- a/include/vcl/filter/PDFiumLibrary.hxx +++ b/include/vcl/filter/PDFiumLibrary.hxx @@ -61,7 +61,8 @@ public: const OString& rPassword) = 0; virtual PDFErrorType getLastErrorCode() = 0; - virtual std::unique_ptr<PDFiumBitmap> createBitmap(int nWidth, int nHeight, int nAlpha) = 0; + /// createBitmap can reduce requested size to possible value + virtual std::unique_ptr<PDFiumBitmap> createBitmap(int& nWidth, int& nHeight, int nAlpha) = 0; }; class PDFiumPage; |