private RotateFlipType GetImageRotate(double angle)
{
switch ((int)angle)
{
case 90:
case -270:
return RotateFlipType.Rotate90FlipNone;
case 180:
case -180:
return RotateFlipType.Rotate180FlipNone;
case 270:
case -90:
return RotateFlipType.Rotate270FlipNone;
default:
throw new ArgumentException("The agle rotate is invalid");
}
}
}