In 3.0rc1 image is loaded without premultiplied alpha:
bool Image::initWithPngData(const unsigned char * data, ssize_t dataLen)
But in 2.2.3 image is loaded with premultiplied alpha:
bool CCImage::_initWithPngData(void * pData, int nDatalen)
png_uint_32 channel = rowbytes/m_nWidth; if (channel == 4) { m_bHasAlpha = true; unsigned int *tmp = (unsigned int *)m_pData; for(unsigned short i = 0; i < m_nHeight; i++) { for(unsigned int j = 0; j < rowbytes; j += 4) { *tmp++ = CC_RGB_PREMULTIPLY_ALPHA( row_pointers[i][j], row_pointers[i][j + 1], row_pointers[i][j + 2], row_pointers[i][j + 3] ); } } m_bPreMulti = true; }
Why was it necessary to remove the premultiplied alpha?
How to reproduсed:
http://www.cocos2d-x.org/forums/6/topics/47767