---
title: "Rotate"
canonical: https://www.graphicsmill.com/samples/LargeImages/Transforms/Rotate_cs
product: "Graphics Mill"
source: "LargeImages/Transforms/Rotate.cs"
---

# Rotate

Rotates image using memory-friendly Pipeline API.

## Instruction

Rotate an image by 5 degrees with a yellow color and save the result.

## Usings

```csharp
using Aurigma.GraphicsMill.Codecs;
using Aurigma.GraphicsMill.Transforms;
```

## Code Snippet

```csharp
using (var reader = ImageReader.Create("Chicago.jpg"))
using (var rotate = new Rotate(5, RgbColor.Yellow, InterpolationMode.High))
using (var writer = ImageWriter.Create("PipelineRotate.jpg"))
{
    Pipeline.Run(reader + rotate + writer);
}
```

## Explanation

The code:

- Reads the image.
- Rotates the image by 5 degrees with a yellow color fill.
- Saves the rotated image to the specified file.

## Tags

- [Pipeline](<https://www.graphicsmill.com/samples/tags/pipeline_md>): Working with images via the Pipeline API
- [Rotate](<https://www.graphicsmill.com/samples/tags/rotate_md>): Rotating images

## Input

- [Chicago.jpg](<https://www.graphicsmill.com/samples/LargeImages/compiled/Debug/Chicago_jpg>) (preview)

## Output

- [PipelineRotate.jpg](<https://www.graphicsmill.com/samples/LargeImages/compiled/Debug/PipelineRotate_jpg>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.Codecs.ImageReader](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_ImageReader.htm.md>)
- [Aurigma.GraphicsMill.Codecs.ImageReader.Create(String)](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Codecs_ImageReader_Create_1_bb3a7a4f.htm.md>)
- [Aurigma.GraphicsMill.Codecs.ImageWriter](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Codecs_ImageWriter.htm.md>)
- [Aurigma.GraphicsMill.Codecs.ImageWriter.Create(String)](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_Codecs_ImageWriter_Create_1_bb3a7a4f.htm.md>)
- [Aurigma.GraphicsMill.Transforms.InterpolationMode](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_InterpolationMode.htm.md>)
- [Aurigma.GraphicsMill.Transforms.Rotate](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Rotate.htm.md>)
