Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Android.Graphics.Bitmap GetImageBitmapFromUrl(string url)
- {
- Android.Graphics.Bitmap imageBitmap = null;
- using (var webClient = new WebClient())
- {
- var imageBytes = webClient.DownloadData(url);
- if (imageBytes != null && imageBytes.Length > 0)
- {
- imageBitmap = BitmapFactory.DecodeByteArray(imageBytes, 0, imageBytes.Length);
- }
- }
- return imageBitmap;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement