fix webp format premultipliedAlpha error

This commit is contained in:
andyque 2014-12-17 14:21:46 +08:00
parent 6ce24b05af
commit 6856f03bff
1 changed files with 3 additions and 0 deletions

View File

@ -2042,6 +2042,9 @@ bool Image::initWithWebpData(const unsigned char * data, ssize_t dataLen)
_width = config.input.width;
_height = config.input.height;
//webp doesn't have premultipliedAlpha
_hasPremultipliedAlpha = false;
_dataLen = _width * _height * 4;
_data = static_cast<unsigned char*>(malloc(_dataLen * sizeof(unsigned char)));