示例#1
0
		public static void RotateImage(Image imageToRotate, ImageRotationStyle style)
		{
			if (imageToRotate != null)
			{
				RotateFlipType flipType;

				switch (style)
				{
					case ImageRotationStyle.CCW:
					{
						flipType = RotateFlipType.Rotate90FlipXY;
						break;
					}
					default:
					{
						flipType = RotateFlipType.Rotate270FlipXY;
						break;
					}
				}

				imageToRotate.RotateFlip(flipType);
			}
		}
示例#2
0
        public static void RotateImage(Image imageToRotate, ImageRotationStyle style)
        {
            if (imageToRotate != null)
            {
                RotateFlipType flipType;

                switch (style)
                {
                case ImageRotationStyle.CCW:
                {
                    flipType = RotateFlipType.Rotate90FlipXY;
                    break;
                }

                default:
                {
                    flipType = RotateFlipType.Rotate270FlipXY;
                    break;
                }
                }

                imageToRotate.RotateFlip(flipType);
            }
        }