mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 17:53:32 +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->_deltaData = this;
|
||||
_contents = reference->_contents;
|
||||
|
||||
QBuffer buffer(&reference->_encodedDelta);
|
||||
buffer.open(QIODevice::ReadOnly);
|
||||
QImage image;
|
||||
image.load(&buffer, "PNG");
|
||||
QImage image = QImage::fromData(reference->_encodedDelta);
|
||||
QPoint offset = image.offset();
|
||||
image = image.convertToFormat(QImage::Format_RGB888);
|
||||
if (offset.x() == 0) {
|
||||
|
|
Loading…
Reference in a new issue