I've been trying to save an image to sdcard on Android. I tried so many ways.
I created a com.packagename.gamename directory inside /mnt/Android/data to save the image.
I know that GLES2 doesn't support reading back GPU and it won't work if I try
But I can create an image like this
var i = Image(100,100,false,Image.FORMAT_RGBA)
And also I can save the screenshot image like this
All the working things are Image type, but this doesn't work
var i = Image()
I've also tried reading the image file and copy to the destination directory using
var src = File.new()
var buffer = src.get_buffer(src.get_len()) #some error at get_len() on android
var dest = File.new()
This also does not work
var d = Directory.new()
All the above things does work on PC but not on Android.
So, is there any other way to save an image to disk other than adding the image to scene and saving the screenshot?
(Why the screenshot image does save, while others not saving? Can I recreate the an image with "required image data" similar to the screenshot image?)