private static void RotateImageBasedOnOrientation(IMagickImage image) { switch (image.Orientation) { case OrientationType.TopLeft: break; case OrientationType.TopRight: image.Flop(); break; case OrientationType.BottomRight: image.Rotate(180); break; case OrientationType.BottomLeft: image.Flop(); image.Rotate(180); break; case OrientationType.LeftTop: image.Flop(); image.Rotate(-90); break; case OrientationType.RightTop: image.Rotate(90); break; case OrientationType.RightBottom: image.Flop(); image.Rotate(90); break; case OrientationType.LeftBotom: image.Rotate(-90); break; default: break; } image.Orientation = OrientationType.TopLeft; }
private IMagickImage CreateCrosshatchTexture() { var gradient = new MagickImage("gradient:", Thickness + 3, Thickness + 3); gradient.Rotate(270); IMagickImage flopped = gradient.Clone(); flopped.Flop(); using (MagickImageCollection images = new MagickImageCollection()) { images.Add(gradient); images.Add(flopped); return(images.AppendVertically()); } }
public void Flop() { _current.Flop(); }