From 6b6237069a7f8656ff5e89f79157a66485e4e1c3 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Thu, 6 Jun 2013 10:16:21 +0200 Subject: [PATCH] bugfix for an issue reported by Yoran Bosman --- src/textures/bitmap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/textures/bitmap.cpp b/src/textures/bitmap.cpp index 86d77b23..301d95f7 100644 --- a/src/textures/bitmap.cpp +++ b/src/textures/bitmap.cpp @@ -381,12 +381,12 @@ public: stream->writeUInt(m_wrapModeV); stream->writeFloat(m_gamma); stream->writeFloat(m_maxAnisotropy); - stream->writeBool(m_separateAlpha); if (!m_filename.empty() && fs::exists(m_filename)) { /* We still have access to the original image -- use that, since it is probably much smaller than the in-memory representation */ ref is = new FileStream(m_filename, FileStream::EReadOnly); + stream->writeBool(m_separateAlpha); stream->writeSize(is->getSize()); is->copyTo(stream); } else { @@ -397,6 +397,7 @@ public: m_mipmap1->toBitmap() : m_mipmap3->toBitmap(); bitmap->write(Bitmap::EOpenEXR, mStream); + stream->writeBool(false); /* separateAlpha */ stream->writeSize(mStream->getSize()); stream->write(mStream->getData(), mStream->getSize()); }