diff --git a/cocos2dx/platform/uphone/UIImage.cpp b/cocos2dx/platform/uphone/UIImage.cpp index 423238c4ee..8948c50b6b 100644 --- a/cocos2dx/platform/uphone/UIImage.cpp +++ b/cocos2dx/platform/uphone/UIImage.cpp @@ -188,6 +188,8 @@ UINT8* UIImage::getRGBA8888Data(void) const TBitmap *pBitmap; int nW; int nH; + UINT8 uR; + UINT8 uB; // convert to RGBA8888 format pBitmap = m_pBitmap->DupBitmapTo32(); @@ -203,12 +205,18 @@ UINT8* UIImage::getRGBA8888Data(void) // alloc memory and store the bitmap data pBufferRet = new UINT8[nW * nH * 4]; memcpy(pBufferRet, pBitmap->GetDataPtr(), nW * nH * 4); - // convert BGRA to RGBA - for (int i = 0; i