From 5b165e7d7bfc8f3ca2f2f2f92cf554a53251e040 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Tue, 19 Nov 2013 14:08:59 -0500 Subject: [PATCH] Create imageloader constructor that keeps track of filesize. --- IO/config/ImageLoader.h.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/IO/config/ImageLoader.h.in b/IO/config/ImageLoader.h.in index 5654af1..1a50c37 100644 --- a/IO/config/ImageLoader.h.in +++ b/IO/config/ImageLoader.h.in @@ -52,6 +52,7 @@ class ImageLoader { protected: const uint8 *const m_RawData; + const int32 m_NumRawDataBytes; uint8 *m_PixelData; uint32 m_Width; @@ -71,6 +72,18 @@ class ImageLoader { ImageLoader(const uint8 *rawData) : m_RawData(rawData) + , m_NumRawDataBytes(-1) + , m_PixelData(0) + , m_Width(0), m_Height(0) + , m_RedChannelPrecision(0), m_RedData(0) + , m_GreenChannelPrecision(0), m_GreenData(0) + , m_BlueChannelPrecision(0), m_BlueData(0) + , m_AlphaChannelPrecision(0), m_AlphaData(0) + { } + + ImageLoader(const uint8 *rawData, const int32 numBytes) + : m_RawData(rawData) + , m_NumRawDataBytes(numBytes) , m_PixelData(0) , m_Width(0), m_Height(0) , m_RedChannelPrecision(0), m_RedData(0)