Hello,
Is there any good way to examine a Bitmap while debugging, or a simple way to temporarily save it to a local file on my machine (without needing to mess around with permissions & other stuff)?
Depending on your Android's storage permission settings, you can stage the bitmaps you need to the app's internal storage, which doesn't require any additional permissions.
Please refer to the following code sample and File Storage and Access with Xamarin.Android to get more details:
var bmp = BitmapFactory.DecodeResource(this.Resources, Resource.Drawable.abc_ab_share_pack_mtrl_alpha);
var backingFile = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "test2.png");
FileStream fs = System.IO.File.OpenWrite(backingFile);
bmp.Compress(Bitmap.CompressFormat.Png, 100, fs);
fs.Flush();
fs.Close();
Toast.MakeText(this, "success!", ToastLength.Long).Show();
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.