Hello,
Welcome to our Microsoft Q&A platform!
but i would like to use a not asynchronous method
The BitmapFactory class also provides the DecodeStream method to create a bitmap.
var img = FindViewById<ImageView>(Resource.Id.img);
var stream = Assets.Open("test.png");
var imgBitmap = BitmapFactory.DecodeStream(stream);
img.SetImageBitmap(imgBitmap);
Best Regards,
Jarvan Zhang
If the response is helpful, 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.