SHARE
TWEET

Untitled

a guest Feb 23rd, 2020 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private Android.Graphics.Bitmap GetImageBitmapFromUrl(string url)
  2.         {
  3.             Android.Graphics.Bitmap imageBitmap = null;
  4.  
  5.             using (var webClient = new WebClient())
  6.             {
  7.                 var imageBytes = webClient.DownloadData(url);
  8.                 if (imageBytes != null && imageBytes.Length > 0)
  9.                 {
  10.                     imageBitmap = BitmapFactory.DecodeByteArray(imageBytes, 0, imageBytes.Length);
  11.                 }
  12.             }
  13.  
  14.             return imageBitmap;
  15.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top