bugfix for an issue reported by Yoran Bosman

metadata
Wenzel Jakob 2013-06-06 10:16:21 +02:00
parent 9215e22c16
commit 6b6237069a
1 changed files with 2 additions and 1 deletions

View File

@ -381,12 +381,12 @@ public:
stream->writeUInt(m_wrapModeV); stream->writeUInt(m_wrapModeV);
stream->writeFloat(m_gamma); stream->writeFloat(m_gamma);
stream->writeFloat(m_maxAnisotropy); stream->writeFloat(m_maxAnisotropy);
stream->writeBool(m_separateAlpha);
if (!m_filename.empty() && fs::exists(m_filename)) { if (!m_filename.empty() && fs::exists(m_filename)) {
/* We still have access to the original image -- use that, since /* We still have access to the original image -- use that, since
it is probably much smaller than the in-memory representation */ it is probably much smaller than the in-memory representation */
ref<Stream> is = new FileStream(m_filename, FileStream::EReadOnly); ref<Stream> is = new FileStream(m_filename, FileStream::EReadOnly);
stream->writeBool(m_separateAlpha);
stream->writeSize(is->getSize()); stream->writeSize(is->getSize());
is->copyTo(stream); is->copyTo(stream);
} else { } else {
@ -397,6 +397,7 @@ public:
m_mipmap1->toBitmap() : m_mipmap3->toBitmap(); m_mipmap1->toBitmap() : m_mipmap3->toBitmap();
bitmap->write(Bitmap::EOpenEXR, mStream); bitmap->write(Bitmap::EOpenEXR, mStream);
stream->writeBool(false); /* separateAlpha */
stream->writeSize(mStream->getSize()); stream->writeSize(mStream->getSize());
stream->write(mStream->getData(), mStream->getSize()); stream->write(mStream->getData(), mStream->getSize());
} }