CCRenderTexture saveToFile png 透明色丢失

CCRenderTexture saveToFile png 透明色丢失
正确代码如下

bool CCRenderTexture::saveToFile(const char *fileName, tCCImageFormat format)
{
bool bRet = false;
CCAssert(format == kCCImageFormatJPEG || format == kCCImageFormatPNG,
“the image can only be saved as JPG or PNG format”);
CCImage *pImage = newCCImage(true);
if (pImage)
{
std::string fullpath = CCFileUtils::sharedFileUtils()->getWritablePath() + fileName;

if(format == kCCImageFormatJPEG)
bRet = pImage->saveToFile(fullpath.c_str(), true);
else
bRet = pImage->saveToFile(fullpath.c_str(), false); }
CC_SAFE_DELETE(pImage);
return bRet;
}