Bitmap bitmap=null;
HttpWebRequest req = WebRequest.Create(url) as HttpWebRequest;
req.Method = "GET";
req.BeginGetResponse(new AsyncCallback((IAsyncResult iar) =>
{
HttpWebRequest reqr = (HttpWebRequest)iar.AsyncState;
HttpWebResponse respr =
(HttpWebResponse)req.EndGetResponse(iar);
BufferedStream bs=new
BufferedStream(respr.GetResponseStream());
BitmapFactory.Options options = new BitmapFactory.Options();
options.InJustDecodeBounds = false;
options.InPurgeable = true;
options.InDither = false;
options.InPreferredConfig = Bitmap.Config.Rgb565;
bitmap = BitmapFactory.DecodeStream(bs, null, options);
}
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/load-image-from-web-tp4370485p5713600.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid