mirror of
https://github.com/Quill-OS/quill.git
synced 2024-10-31 21:33:22 -07:00
Reader: Save RAM when displaying images
This commit is contained in:
parent
df4e2e26a7
commit
e0ff65505c
1 changed files with 2 additions and 0 deletions
|
@ -2032,6 +2032,7 @@ void reader::setupPng() {
|
||||||
if(is_pdf == true) {
|
if(is_pdf == true) {
|
||||||
// Note: Output file is supposed to be '/run/page.png', but somehow mutool puts it in '/run/page1.png'
|
// Note: Output file is supposed to be '/run/page.png', but somehow mutool puts it in '/run/page1.png'
|
||||||
QPixmap pixmap("/run/page1.png");
|
QPixmap pixmap("/run/page1.png");
|
||||||
|
QFile::remove("/run/page1.png");
|
||||||
// Initialized above
|
// Initialized above
|
||||||
graphicsScene->clear();
|
graphicsScene->clear();
|
||||||
graphicsScene->addPixmap(pixmap);
|
graphicsScene->addPixmap(pixmap);
|
||||||
|
@ -2043,6 +2044,7 @@ void reader::setupPng() {
|
||||||
}
|
}
|
||||||
else if(is_image == true) {
|
else if(is_image == true) {
|
||||||
QPixmap pixmap("/run/image.png");
|
QPixmap pixmap("/run/image.png");
|
||||||
|
QFile::remove("/run/image.png");
|
||||||
// Initialized above
|
// Initialized above
|
||||||
graphicsScene->clear();
|
graphicsScene->clear();
|
||||||
graphicsScene->addPixmap(pixmap);
|
graphicsScene->addPixmap(pixmap);
|
||||||
|
|
Loading…
Reference in a new issue