Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Cannot access closed stream after cropping image

$
0
0

Hi Xamarin Forum
Im currently getting Cannot access closed stream after I crop my Image here is the code where I get that error :)

 private void Refresh()
        {
            try
            {
                if (App.CroppedImage != null)
                {
                    Stream stream = new MemoryStream(App.CroppedImage);
                    var memoryStream = new MemoryStream(App.CroppedImage);
                    imageView.Source = ImageSource.FromStream(() =>  memoryStream);
                    Content = imageView;
                }
            }
            catch (Exception ex)
            {
              //  
            }
        }

FYI I tried the using(var ms = MemoryStream())


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>