On the phone, you can use HttbWebRequest (it is recommended to avoid the influence of the user interface) or WebClient for the project that I posted here.
WebClient, HttpWebRequest and user interface on Windows Phone 7
Then you can take your stream and transfer it to something like that to write it to isolated storage.
private void PicToIsoStore(Stream pic) {
using (var isoStore = IsolatedStorageFile.GetUserStoreForApplication()) {
var bi = new BitmapImage();
bi.SetSource(pic);
var wb = new WriteableBitmap(bi);
using (var isoFileStream = isoStore.CreateFile("somepic.jpg")) {
var width = wb.PixelWidth;
var height = wb.PixelHeight;
Extensions.SaveJpeg(wb, isoFileStream, width, height, 0, 100);
}
}
}
, MediaLibrary.SavePicture. , Picture Hub.
,
private void PicToMediaLibary(Stream pic) {
MediaLibrary lib = new MediaLibrary();
lib.SavePicture("blah", pic);
}
- , , .