Fix bug where we forgot to store the new height and width

This commit is contained in:
Pavel Krajcevski 2012-10-20 21:19:04 -04:00
parent 87b9aa6856
commit 1424765866

View file

@ -12,7 +12,10 @@ static inline T sad( const T &a, const T &b ) {
return (a > b)? a - b : b - a;
}
Image::Image(const CompressedImage &ci) {
Image::Image(const CompressedImage &ci)
: m_Width(ci.GetWidth())
, m_Height(ci.GetHeight())
{
unsigned int bufSz = ci.GetWidth() * ci.GetHeight() * 4;
m_PixelData = new uint8[ bufSz ];
if(!m_PixelData) { fprintf(stderr, "%s\n", "Out of memory!"); return; }