This project is read-only.

how to save CCTexture2D object to png image

Topics: Sprites and SpriteBatch
Aug 5, 2013 at 10:19 AM
On windows and wp platform,CCTexture2D has got SaveAsPng method,but on ios and android,it's not implemented.So,is there any way to save CCTexture2D object to local png image?It's important to my game,Thanks!
Aug 6, 2013 at 5:59 PM
On MacOS you can do it with MonoGame.

On Android, you can do it sometimes with MonoGame.

On iOS you can do it sometimes with MonoGame.

The saving of a texture from the GPU is highly dependent on the hardware and your textures. We simply call the underlying Texture2D method to write it as either JPG or PNG.

If the XNA runtime you are using, e.g. MonoGame, doesn't support it, then you won't get it.