From 623f79290406ad48891281c2bb46fa171965e25f Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Wed, 2 Oct 2013 11:19:36 -0400 Subject: [PATCH] Refactor --- PVRTCEncoder/src/Image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVRTCEncoder/src/Image.cpp b/PVRTCEncoder/src/Image.cpp index ff1d277..cb9b4b9 100644 --- a/PVRTCEncoder/src/Image.cpp +++ b/PVRTCEncoder/src/Image.cpp @@ -363,7 +363,7 @@ void Image::ContentAwareDownscale(uint32 xtimes, uint32 ytimes, void Image::ChangeBitDepth(const uint8 (&depths)[4]) { for(uint32 j = 0; j < GetHeight(); j++) { for(uint32 i = 0; i < GetWidth(); i++) { - uint32 pidx = j * GetWidth() + i; + uint32 pidx = GetPixelIndex(i, j); m_Pixels[pidx].ChangeBitDepth(depths); } }