mirror of https://github.com/axmolengine/axmol.git
fix webp format premultipliedAlpha error
This commit is contained in:
parent
6ce24b05af
commit
6856f03bff
|
@ -2042,6 +2042,9 @@ bool Image::initWithWebpData(const unsigned char * data, ssize_t dataLen)
|
||||||
_width = config.input.width;
|
_width = config.input.width;
|
||||||
_height = config.input.height;
|
_height = config.input.height;
|
||||||
|
|
||||||
|
//webp doesn't have premultipliedAlpha
|
||||||
|
_hasPremultipliedAlpha = false;
|
||||||
|
|
||||||
_dataLen = _width * _height * 4;
|
_dataLen = _width * _height * 4;
|
||||||
_data = static_cast<unsigned char*>(malloc(_dataLen * sizeof(unsigned char)));
|
_data = static_cast<unsigned char*>(malloc(_dataLen * sizeof(unsigned char)));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue