---
title: "Rotate Arbitrary"
canonical: https://www.graphicsmill.com/samples/Transforms/RotateAndFlip/RotateArbitrary_cs
product: "Graphics Mill"
source: "Transforms/RotateAndFlip/RotateArbitrary.cs"
---

# Rotate Arbitrary

Rotates image on arbitrary angle.

## Instruction

Rotate the image by 15 degrees and fill the background with yellow color, applying high-quality interpolation.

## Usings

```csharp
using Aurigma.GraphicsMill.Transforms;
```

## Code Snippet

```csharp
using (var bitmap = new Bitmap("Chicago.jpg"))
{
    bitmap.Transforms.Rotate(15, RgbColor.Yellow, InterpolationMode.High);
    bitmap.Save("RotateArbitrary.jpg");
}
```

## Explanation

The code:

- Loads the image from the file "Chicago.jpg".
- Applies the "Rotate" transform with a 15-degree rotation, setting the background color to yellow and using high-quality interpolation.
- Saves the rotated image with the specified adjustments to a new file, "RotateArbitrary.jpg".

## Tags

- [Bitmap](<https://www.graphicsmill.com/samples/tags/bitmap_md>): Working with images via the Bitmap API
- [Rotate](<https://www.graphicsmill.com/samples/tags/rotate_md>): Rotating images

## Input

- [Chicago.jpg](<https://www.graphicsmill.com/samples/Transforms/compiled/Debug/Chicago_jpg>) (preview)

## Output

- [RotateArbitrary.jpg](<https://www.graphicsmill.com/samples/Transforms/compiled/Debug/RotateArbitrary_jpg>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.Bitmap.Transforms](<https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Bitmap_Transforms.htm.md>)
- [Aurigma.GraphicsMill.Transforms.InterpolationMode](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_InterpolationMode.htm.md>)
- [Aurigma.GraphicsMill.TransformsProvider.Rotate(Single,Color,InterpolationMode)](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_TransformsProvider_Rotate_3_4ae95bb1.htm.md>)
