mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Improved the texture size accuracy when rendering pages using es-pdf-convert
This commit is contained in:
parent
1dca0673c5
commit
b847b15e07
|
@ -209,9 +209,8 @@ int main(int argc, char* argv[])
|
||||||
const double pageHeight {pageRect.height()};
|
const double pageHeight {pageRect.height()};
|
||||||
const double sizeFactor {static_cast<double>(rotate ? height : width) / pageHeight};
|
const double sizeFactor {static_cast<double>(rotate ? height : width) / pageHeight};
|
||||||
|
|
||||||
poppler::image image {pageRenderer.render_page(
|
poppler::image image {
|
||||||
page, static_cast<int>(std::round(72.0 * sizeFactor)),
|
pageRenderer.render_page(page, 72.0 * sizeFactor, 72.0 * sizeFactor, 0, 0, width, height)};
|
||||||
static_cast<int>(std::round(72.0 * sizeFactor)), 0, 0, width, height)};
|
|
||||||
|
|
||||||
if (!image.is_valid()) {
|
if (!image.is_valid()) {
|
||||||
std::cerr << "Rendered image is invalid" << std::endl;
|
std::cerr << "Rendered image is invalid" << std::endl;
|
||||||
|
|
Loading…
Reference in a new issue