Rotate Class

Rotates an image at arbitrary angle.

Namespace: Aurigma.GraphicsMill.Transforms
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public sealed class Rotate : Transform

Remarks

The main parameter of this transform is Angle to rotate the image to. If specified angle is 90, 180, or 270 degrees, a special algorithm which avoids floating-point calculations is used automatically, which yields to higher performance.

Another important property is InterpolationMode that defines an interpolation algorithm. Different algorithms produce different quality, but as usual the higher quality an algorithm produces, the slower it works.

Examples

The following code rotates an image by 5 degrees clockwise.

C#
using (var bitmap = new Bitmap(@"Images\in.jpg"))
using (var rotate = new Rotate(5, RgbColor.Yellow, InterpolationMode.Medium))
{
    using (var result = rotate.Apply(bitmap))
    {
        result.Save(@"Images\Output\out.jpg");
    }
}

Inheritance Hierarchy

System.Object

Thread Safety

Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.

See Also

Reference

Manual