Merge pull request #365 from axmx/master

[airplay] incorrect calculation of the bit depth
This commit is contained in:
Walzer 2011-07-07 18:50:44 -07:00
commit b91f046157
1 changed files with 1 additions and 1 deletions

View File

@ -187,7 +187,7 @@ bool CCImage::_initWithPngData(void * pData, int nDatalen)
m_nHeight = (unsigned int)png_get_image_height(pngPtr, infoPtr); m_nHeight = (unsigned int)png_get_image_height(pngPtr, infoPtr);
m_nWidth = (unsigned int) png_get_image_width(pngPtr, infoPtr); m_nWidth = (unsigned int) png_get_image_width(pngPtr, infoPtr);
m_nBitsPerComponent = (unsigned int)png_get_bit_depth(pngPtr, infoPtr)/bytesPerComponent; m_nBitsPerComponent = (unsigned int)png_get_bit_depth(pngPtr, infoPtr);
m_pData = new unsigned char[m_nHeight * m_nWidth * bytesPerComponent]; m_pData = new unsigned char[m_nHeight * m_nWidth * bytesPerComponent];