Merge pull request #9533 from andyque/fixWebpPremultiplyAlpha

fix webp format premultipliedAlpha error
This commit is contained in:
minggo 2014-12-19 09:53:44 +08:00
commit 6f0a4191cb
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)));