From b847b15e0722fb5187702901988fbe175ac79379 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 28 Jun 2023 23:06:05 +0200 Subject: [PATCH] Improved the texture size accuracy when rendering pages using es-pdf-convert --- es-pdf-converter/src/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/es-pdf-converter/src/main.cpp b/es-pdf-converter/src/main.cpp index 147506f71..3358ca902 100644 --- a/es-pdf-converter/src/main.cpp +++ b/es-pdf-converter/src/main.cpp @@ -209,9 +209,8 @@ int main(int argc, char* argv[]) const double pageHeight {pageRect.height()}; const double sizeFactor {static_cast(rotate ? height : width) / pageHeight}; - poppler::image image {pageRenderer.render_page( - page, static_cast(std::round(72.0 * sizeFactor)), - static_cast(std::round(72.0 * sizeFactor)), 0, 0, width, height)}; + poppler::image image { + pageRenderer.render_page(page, 72.0 * sizeFactor, 72.0 * sizeFactor, 0, 0, width, height)}; if (!image.is_valid()) { std::cerr << "Rendered image is invalid" << std::endl;