diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-10-13 21:03:46 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-10-14 08:40:40 +0200 |
commit | 7c88c0089af36bc8075b87480669e78385d6b878 (patch) | |
tree | 5284312a95df341a16e6aa2cb9445bea1c489923 /vcl/source | |
parent | 538d69a4c9e382b95ea9a42fa7e51efad22b6807 (diff) |
pdfium: add an FPDFImageObj_GetImageMetadata() wrapper
And in general use more pdfium wrappers in CppunitTest_vcl_pdfexport, so
all the '#if defined OSL_BIGENDIAN' checks can be removed.
Change-Id: Id05e6ecf3dbb103a263d6068085eede847be320f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104254
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/pdf/PDFiumLibrary.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx index a0668d0c6048..b8d0cb536be7 100644 --- a/vcl/source/pdf/PDFiumLibrary.cxx +++ b/vcl/source/pdf/PDFiumLibrary.cxx @@ -355,6 +355,13 @@ std::unique_ptr<PDFiumPathSegment> PDFiumPageObject::getPathSegment(int index) return pPDFiumPathSegment; } +Size PDFiumPageObject::getImageSize(PDFiumPage& rPage) +{ + FPDF_IMAGEOBJ_METADATA aMeta; + FPDFImageObj_GetImageMetadata(mpPageObject, rPage.getPointer(), &aMeta); + return Size(aMeta.width, aMeta.height); +} + BitmapChecksum PDFiumPage::getChecksum() { size_t nPageWidth = getWidth(); |