class CC_DLL CCImage :public
CCObject
{public:
bool
initWithImageFile(const char *
strPath,
EImageFormat
imageType =
kFmtPng);
bool
initWithImageFileThreadSafe(const char *fullpath,
EImageFormat
imageType =
kFmtPng);
bool
initWithImageData
。。。。
bool
initWithString
。。。。
unsigned char *
getData() { return
m_pData; }
int
getDataLen() { return
m_nWidth *
m_nHeight; }
bool
hasAlpha() { return
m_bHasAlpha; }
bool
isPremultipliedAlpha() { return
m_bPreMulti; }
bool
saveToFile(const char *pszFilePath,
bool
bIsToRGB = true);
Protected:
bool _saveImageToPNG(const
char *pszFilePath,
bool
bIsToRGB = true);
bool _saveImageToJPG(const
char *pszFilePath);
unsigned char *m_pData;
};