daniel-luberda / DLToolkit.Forms.Controls

Xamarin.Forms Custom Controls
Apache License 2.0
393 stars 182 forks source link

ImageCropView: "Can not access a closed stream." #282

Open VanDerSloth opened 5 years ago

VanDerSloth commented 5 years ago

Hello,

with XF 3.6, the App throws an exception with the message "Can not access a closed stream." on the line var result = await cropView.GetImageAsJpegAsync();

It doesn't matter what the Source for the CropView element is - I've tried the standard URL as well as a Stream (which is how it should be implemented in the end). Any ideas?

lsaudon commented 4 years ago
ImageCropView.Source = ImageSource.FromStream(() =>
                {
                    var stream = file.GetStream();
                    //file.Dispose();
                    return stream;
                });

remove file.Dispose()