From e4c8708a4acc75bf5a59f1483ca4a214510b429b Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Tue, 18 Sep 2012 10:59:39 -0400 Subject: [PATCH] Fix bug with PNG image loader. --- IO/src/ImageLoaderPNG.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/IO/src/ImageLoaderPNG.cpp b/IO/src/ImageLoaderPNG.cpp index baedf2b..c267cfa 100644 --- a/IO/src/ImageLoaderPNG.cpp +++ b/IO/src/ImageLoaderPNG.cpp @@ -108,7 +108,7 @@ bool ImageLoaderPNG::ReadData() { png_read_row(png_ptr, rowData, NULL); - unsigned int rowOffset = i * m_Height; + unsigned int rowOffset = i * m_Width; unsigned int byteIdx = 0; for(int j = 0; j < m_Width; j++) { @@ -132,7 +132,7 @@ bool ImageLoaderPNG::ReadData() { png_read_row(png_ptr, rowData, NULL); - unsigned int rowOffset = i * m_Height; + unsigned int rowOffset = i * m_Width; unsigned int byteIdx = 0; for(int j = 0; j < m_Width; j++) { @@ -159,7 +159,7 @@ bool ImageLoaderPNG::ReadData() { png_read_row(png_ptr, rowData, NULL); - unsigned int rowOffset = i * m_Height; + unsigned int rowOffset = i * m_Width; unsigned int byteIdx = 0; for(int j = 0; j < m_Width; j++) { @@ -183,7 +183,7 @@ bool ImageLoaderPNG::ReadData() { png_read_row(png_ptr, rowData, NULL); - unsigned int rowOffset = i * m_Height; + unsigned int rowOffset = i * m_Width; unsigned int byteIdx = 0; for(int j = 0; j < m_Width; j++) {