---
title: "Rotate"
canonical: https://www.graphicsmill.com/samples/Transforms/RotateAndFlip/Rotate_cs
product: "Graphics Mill"
source: "Transforms/RotateAndFlip/Rotate.cs"
---

# Rotate

Rotates image on 90, 180, 270 degrees.

## Instruction

Rotate the image by 90 degrees.

## Code Snippet

```csharp
using (var bitmap = new Bitmap("Chicago.jpg"))
{
    bitmap.Transforms.Rotate(90);
    bitmap.Save("Rotate.jpg");
}
```

## Explanation

The code:

- Loads the image from the file "Chicago.jpg".
- Applies the "Rotate" transform to rotate the image by 90 degrees.
- Saves the rotated image to a new file, "Rotate.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

- [Rotate.jpg](<https://www.graphicsmill.com/samples/Transforms/compiled/Debug/Rotate_jpg>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.Bitmap.Transforms](<https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Bitmap_Transforms.htm.md>)
- [Aurigma.GraphicsMill.TransformsProvider.Rotate(Single)](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_TransformsProvider_Rotate_1_7a94462e.htm.md>)
