var file = await Plugin.Media.CrossMedia.Current.PickPhotoAsync(new Plugin.Media.Abstractions.PickMediaOptions
{
PhotoSize = Plugin.Media.Abstractions.PhotoSize.Medium
});
if (file == null)
return;
AppApplication.Instance().NewImage = file.GetStream();
ProfileIcon.Source = ImageSource.FromStream(() =>
{
var stream = file.GetStream();
file.Dispose();
return stream;
});
I am trying to reduce size of image which i am selecting from gallery using Plugin.media
How i can reduce size or stream of image in xamarin forms?