TransformsProvider.Rotate Method (Single, Color, InterpolationMode)

Rotates the bitmap at arbitrary angle using the specified background color and interpolation algorithm.

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

Syntax

C#
public void Rotate(
	float angle,
	Color color,
	InterpolationMode mode
)

Parameters

angle

Type: System.Single

The angle to rotate the image at (in degrees).
color

Type: Aurigma.GraphicsMill.Color

The background color for the rotated image.
mode

Type: Aurigma.GraphicsMill.Transforms.InterpolationMode

A ResizeInterpolationMode interpolation algorithm which used during the rotation.

Remarks

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.

You can also use Rotate class to apply this transform.

Examples

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

See Also

Reference

Manual