@diepduong wrote:
Hi,
I am using RenderTexture to save and load image, it works well ọn iOS but not on Android.
Here is my sample code:
// Create render texture and capture image from spriteA
RenderTexture *render = RenderTexture::create(100,100);
render->begin();
spriteA->visit();
render->end();//Save image file from Render Texture
render->saveToFile("SavedFileName", Image::Format::PNG)//Load file into Sprite then
std::string fullpath = FileUtils::getInstance()->getWritablePath() + "SavedFileName";
Sprite *sprite = Sprite::create(fullpath);The sprite with image the same as spriteA above but it's quite empty on Android.
Anybody help?
Thank you.
Posts: 2
Participants: 2