aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorZackaryWelch <welch.zackary@gmail.com>2018-03-03 21:19:07 -0500
committerZackaryWelch <welch.zackary@gmail.com>2018-03-03 21:19:07 -0500
commitb977629379983704dffdc378a4662992e2db5c8e (patch)
tree49462f6e33bee472ab322db69e6f6dc7e4cfc352 /src-qt5
parentMerge pull request #552 from boronology/patch-1 (diff)
downloadlumina-b977629379983704dffdc378a4662992e2db5c8e.tar.gz
lumina-b977629379983704dffdc378a4662992e2db5c8e.tar.bz2
lumina-b977629379983704dffdc378a4662992e2db5c8e.zip
Changed fz_rotate to fz_pre_rotate, which fixes rendering issues in some PDFs with the new version of mupdf-1.12.
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp b/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp
index 05854e1b..15379465 100644
--- a/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp
+++ b/src-qt5/desktop-utils/lumina-pdf/Renderer-mupdf.cpp
@@ -104,12 +104,12 @@ QImage Renderer::renderPage(int pagenum, QSize DPI){
//double scaleFactorH = dpi.height()/72.0;
//fz_scale(&matrix, scaleFactorW, scaleFactorH);
fz_scale(&matrix, 4.0, 4.0); //need to adjust this later according to DPI
- fz_rotate(&matrix, 0.0);
+ fz_pre_rotate(&matrix, 0.0);
fz_pixmap *pixmap = fz_new_pixmap_from_page_number(CTX, DOC, pagenum, &matrix, fz_device_rgb(CTX), 0);
//unsigned char *samples = fz_pixmap_samples(CTX, pixmap);
img = QImage(pixmap->samples, pixmap->w, pixmap->h, QImage::Format_RGB888); //make the raw image a bit larger than the end result
+ delete PAGE;
}
- if(PAGE!=0){ delete PAGE; }
qDebug() << "Render Page:" << pagenum << img.size();
return img;
}
bgstack15