mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 00:56:45 +02:00
Simplify image loading.
This commit is contained in:
parent
ffe87ad8c6
commit
10315f15d4
1 changed files with 1 additions and 5 deletions
|
@ -505,11 +505,7 @@ HeightfieldData::HeightfieldData(Bitstream& in, int bytes, const HeightfieldData
|
||||||
reference->_encodedDelta = in.readAligned(bytes);
|
reference->_encodedDelta = in.readAligned(bytes);
|
||||||
reference->_deltaData = this;
|
reference->_deltaData = this;
|
||||||
_contents = reference->_contents;
|
_contents = reference->_contents;
|
||||||
|
QImage image = QImage::fromData(reference->_encodedDelta);
|
||||||
QBuffer buffer(&reference->_encodedDelta);
|
|
||||||
buffer.open(QIODevice::ReadOnly);
|
|
||||||
QImage image;
|
|
||||||
image.load(&buffer, "PNG");
|
|
||||||
QPoint offset = image.offset();
|
QPoint offset = image.offset();
|
||||||
image = image.convertToFormat(QImage::Format_RGB888);
|
image = image.convertToFormat(QImage::Format_RGB888);
|
||||||
if (offset.x() == 0) {
|
if (offset.x() == 0) {
|
||||||
|
|
Loading…
Reference in a new issue