RAM usage reduced (tested 107 pics 220MB to 68MB)
This commit is contained in:
parent
5af3dabcb8
commit
3be2e49d5c
4 changed files with 128 additions and 22 deletions
|
|
@ -86,11 +86,12 @@ void SnapmaticWidget::setSnapmaticPicture(SnapmaticPicture *picture, QString pic
|
|||
picStr = picture->getPictureStr();
|
||||
picTitl = picture->getPictureTitl();
|
||||
|
||||
QPixmap SnapmaticPixmap = QPixmap::fromImage(picture->getPicture(), Qt::AutoColor);
|
||||
SnapmaticPixmap.scaled(ui->labPicture->width(), ui->labPicture->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
QPixmap SnapmaticPixmap = QPixmap::fromImage(picture->getPicture().scaled(ui->labPicture->width(), ui->labPicture->height(), Qt::KeepAspectRatio, Qt::SmoothTransformation), Qt::AutoColor);
|
||||
ui->labPicStr->setText(picStr + "\n" + picTitl + "");
|
||||
ui->labPicture->setPixmap(SnapmaticPixmap);
|
||||
|
||||
picture->clearCache();
|
||||
|
||||
adjustTextColor();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue