我正在尝试通过这个从图片中心加载图像......
void photoChooser_Completed(object sender, PhotoResult e)
    {           
        try
        {
            var imageVar = new BitmapImage();
            imageVar.SetSource(e.ChosenPhoto);           
            var b = new WriteableBitmap(imageVar.PixelWidth, imageVar.PixelHeight);
            b.LoadJpeg(toStream(imageVar));//here comes the exception
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message);
        }
    }
Stream toStream(BitmapImage img) 
    {
        WriteableBitmap bmp = new WriteableBitmap((BitmapSource)img);
        using (MemoryStream stream = new MemoryStream())
        {
            bmp.SaveJpeg(stream, bmp.PixelWidth, bmp.PixelHeight, 0, 100);
            return stream;
        }
    }
访问isolotedstorage时发生错误。请帮忙 !