I am trying to get the cropped image size before saving to determine if I should rotate the image or not. With the attached code I am getting that the height is greater than the width, even though the width is actually greater.
I am using the ActualImageRenderedBounds, which is probably the incorrect property.
editor.Crop();
IsCropEnabled = false;
Crop.IsVisible = Cancel.IsVisible = false;
if (VM.SelectedCardImageEnumInt == (int)CardImageEnum.Logo)
{
if (VM.InitialRotation != 0)
{
editor.Rotate();
}
}
else
{
var shouldRotate = editor.ActualImageRenderedBounds.Width > editor.ActualImageRenderedBounds.Height;
if (VM.InitialRotation == 0)
{
if(shouldRotate)
{
editor.Rotate();
}
}
else
{
editor.Rotate();
if (shouldRotate)
{
editor.Rotate();
}
}
Attachment:
ImageProcess.cs_1a6bf14e.zip