mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08: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) {
|
||||
// Note: Output file is supposed to be '/run/page.png', but somehow mutool puts it in '/run/page1.png'
|
||||
QPixmap pixmap("/run/page1.png");
|
||||
QFile::remove("/run/page1.png");
|
||||
// Initialized above
|
||||
graphicsScene->clear();
|
||||
graphicsScene->addPixmap(pixmap);
|
||||
|
@ -2043,6 +2044,7 @@ void reader::setupPng() {
|
|||
}
|
||||
else if(is_image == true) {
|
||||
QPixmap pixmap("/run/image.png");
|
||||
QFile::remove("/run/image.png");
|
||||
// Initialized above
|
||||
graphicsScene->clear();
|
||||
graphicsScene->addPixmap(pixmap);
|
||||
|
|
Loading…
Reference in a new issue