Hello,
Welcome to our Microsoft Q&A platform!
I have an Android.Graphics.Bitmap and how to save it to the Pictures
To save the bitmap to Android storage, you could create a FileStream
object with the path and then call the Bitmap.Compress
method to generate the picture.
Check the code:
var folder = Android.OS.Environment.ExternalStorageDirectory.AbsolutePath;
var filePath = System.IO.Path.Combine(folder, "test.png");
var stream = new FileStream(filePath, FileMode.Create);
//get the bitmap
bitmap.Compress(Bitmap.CompressFormat.Png, 100, stream);
stream.Close();
Best Regards,
Jarvan Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.