mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Dothe QImage -> QPixmap transformation in parallel
This commit is contained in:
parent
f258ca1a3e
commit
059ed3aa14
@ -23,7 +23,7 @@ public:
|
|||||||
|
|
||||||
const QPoint &xy() const {return _xy;}
|
const QPoint &xy() const {return _xy;}
|
||||||
const QString &key() const {return _key;}
|
const QString &key() const {return _key;}
|
||||||
QPixmap pixmap() const {return QPixmap::fromImage(_image);}
|
const QPixmap &pixmap() const {return _pixmap;}
|
||||||
|
|
||||||
void load() {
|
void load() {
|
||||||
QByteArray z(QString::number(_zoom).toLatin1());
|
QByteArray z(QString::number(_zoom).toLatin1());
|
||||||
@ -32,7 +32,7 @@ public:
|
|||||||
QImageReader reader(&buffer, z);
|
QImageReader reader(&buffer, z);
|
||||||
if (_scaledSize)
|
if (_scaledSize)
|
||||||
reader.setScaledSize(QSize(_scaledSize, _scaledSize));
|
reader.setScaledSize(QSize(_scaledSize, _scaledSize));
|
||||||
reader.read(&_image);
|
_pixmap = QPixmap::fromImage(reader.read());
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -41,7 +41,7 @@ private:
|
|||||||
QPoint _xy;
|
QPoint _xy;
|
||||||
QByteArray _data;
|
QByteArray _data;
|
||||||
QString _key;
|
QString _key;
|
||||||
QImage _image;
|
QPixmap _pixmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user