-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Hello,
I'm using this plugin to resize images loaded via picker on a XF app.
In Android, when I pick an image and execute the following code the image is correctly resized but it is also rotated.
using (IEditableImage image = await CrossImageEdit.Current.CreateImageAsync(stream))
{
byte[] byteArray = await Task.Run(() => image.Resize(700).ToPng());
using (Stream outStream = File.OpenWrite(newFileName))
{
outStream.Write(byteArray, 0, byteArray.Length);
outStream.Flush();
outStream.Close();
}
}
I also tried the following code but the result is the same:
byte[] byteArray;
if (image.Width >= image.Height)
byteArray = await Task.Run(() => image.Resize(700, 0).ToPng());
else
byteArray = await Task.Run(() => image.Resize(0, 700).ToPng());
using (Stream outStream = File.OpenWrite(newFileName))
{
outStream.Write(byteArray, 0, byteArray.Length);
outStream.Flush();
outStream.Close();
}
Thanks in advance,
Matteo
Metadata
Metadata
Assignees
Labels
No labels