0
如何從圖像數據創建的base64字符串編碼的base64編碼的base64字符串, 生病嘗試這樣的Cocos2D-X - 從圖像數據精靈或紋理數據
CCRenderTexture* r = CCRenderTexture::create(sprite->getTexture()->getPixelsWide(), sprite->getTexture()->getPixelsHigh());
r->beginWithClear(1, 1, 1, 0);
sprite->visit();
r->end();
CCImage *img = r->newCCImage();
unsigned char *data = img->getData();
int len = img->getDataLen();
str = base64_encode(data, len);
return str;