From 4c7edd457ed0e565cfe27f4f3dc5e20e4830baa5 Mon Sep 17 00:00:00 2001 From: yangxiao <yangxiao@cocos2d-x.org> Date: Tue, 13 Oct 2015 15:45:24 +0800 Subject: [PATCH] set _hasPremultipliedAlpha to false --- cocos/platform/CCImage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cocos/platform/CCImage.cpp b/cocos/platform/CCImage.cpp index e99268d0a4..08f2f2d601 100644 --- a/cocos/platform/CCImage.cpp +++ b/cocos/platform/CCImage.cpp @@ -1583,6 +1583,8 @@ bool Image::initWithPVRv3Data(const unsigned char * data, ssize_t dataLen) { _hasPremultipliedAlpha = true; } + else + _hasPremultipliedAlpha = false; // sizing int width = CC_SWAP_INT32_LITTLE_TO_HOST(header->width); @@ -1845,7 +1847,7 @@ namespace bool Image::initWithS3TCData(const unsigned char * data, ssize_t dataLen) { - + _hasPremultipliedAlpha = false; const uint32_t FOURCC_DXT1 = makeFourCC('D', 'X', 'T', '1'); const uint32_t FOURCC_DXT3 = makeFourCC('D', 'X', 'T', '3'); const uint32_t FOURCC_DXT5 = makeFourCC('D', 'X', 'T', '5');