diff --git a/cocos2dx/platform/uphone/UIImage.cpp b/cocos2dx/platform/uphone/UIImage.cpp index 49086a8c97..a81419780b 100644 --- a/cocos2dx/platform/uphone/UIImage.cpp +++ b/cocos2dx/platform/uphone/UIImage.cpp @@ -134,13 +134,13 @@ int UIImage::CGImageGetBitsPerComponent(void) return nRet; } -// 0 -> the bits of every color component is 8 +// 0 -> it is a mask // 1 -> other int UIImage::CGImageGetColorSpace(void) { int nRet = 1; - if (CGImageGetBitsPerComponent() == 8) + if (m_pBitmap->GetRowBytes() == 1) { nRet = 0; }