fixed #1279: NodeNonOpaqueTest can't be shown correctly.

This commit is contained in:
James Chen 2012-05-30 18:30:11 +08:00
parent 922f7544ad
commit 6be44ad7b0
1 changed files with 3 additions and 1 deletions

View File

@ -244,8 +244,10 @@ bool CCImage::_initWithJpgData(void * data, int nSize)
while( cinfo.output_scanline < cinfo.image_height )
{
jpeg_read_scanlines( &cinfo, row_pointer, 1 );
for( i=0; i<cinfo.image_width*cinfo.num_components;i++)
for( i=0; i<cinfo.image_width*cinfo.output_components;i++)
{
m_pData[location++] = row_pointer[0][i];
}
}
jpeg_finish_decompress( &cinfo );