1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +01:00

Dothe QImage -> QPixmap transformation in parallel

This commit is contained in:
Martin Tůma 2023-11-17 16:17:53 +01:00
parent f258ca1a3e
commit 059ed3aa14

View File

@ -23,7 +23,7 @@ public:
const QPoint &xy() const {return _xy;}
const QString &key() const {return _key;}
QPixmap pixmap() const {return QPixmap::fromImage(_image);}
const QPixmap &pixmap() const {return _pixmap;}
void load() {
QByteArray z(QString::number(_zoom).toLatin1());
@ -32,7 +32,7 @@ public:
QImageReader reader(&buffer, z);
if (_scaledSize)
reader.setScaledSize(QSize(_scaledSize, _scaledSize));
reader.read(&_image);
_pixmap = QPixmap::fromImage(reader.read());
}
private:
@ -41,7 +41,7 @@ private:
QPoint _xy;
QByteArray _data;
QString _key;
QImage _image;
QPixmap _pixmap;
};