Simplify image loading.

This commit is contained in:
Andrzej Kapolka 2014-08-11 15:15:33 -07:00
parent ffe87ad8c6
commit 10315f15d4

View file

@ -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) {