diff --git a/IO/src/ImageLoader.cpp b/IO/src/ImageLoader.cpp index f2bbed0..8208ebc 100644 --- a/IO/src/ImageLoader.cpp +++ b/IO/src/ImageLoader.cpp @@ -138,6 +138,11 @@ unsigned int ImageLoader::GetChannelForPixel(uint32 x, uint32 y, uint32 ch) { } bool ImageLoader::LoadFromPixelBuffer(uint32 *data) { + m_RedChannelPrecision = 8; + m_GreenChannelPrecision = 8; + m_BlueChannelPrecision = 8; + m_AlphaChannelPrecision = 8; + const int nPixels = m_Width * m_Height; m_RedData = new uint8[nPixels]; m_GreenData = new uint8[nPixels]; diff --git a/IO/src/ImageLoaderPVR.cpp b/IO/src/ImageLoaderPVR.cpp index 765c9b4..5ec9e98 100644 --- a/IO/src/ImageLoaderPVR.cpp +++ b/IO/src/ImageLoaderPVR.cpp @@ -74,11 +74,6 @@ bool ImageLoaderPVR::ReadData() { return false; } - m_RedChannelPrecision = 8; - m_GreenChannelPrecision = 8; - m_BlueChannelPrecision = 8; - m_AlphaChannelPrecision = 8; - const pvrtexture::CPVRTextureHeader &hdr = pvrTex.getHeader(); m_Width = hdr.getWidth();