---
title: "Resize"
canonical: https://www.graphicsmill.com/samples/Transforms/Resize/Resize_cs
product: "Graphics Mill"
source: "Transforms/Resize/Resize.cs"
---

# Resize

Resizes image.

## Instruction

Resize the image to a width of 320 pixels, maintaining the aspect ratio, with high-quality interpolation.

## Usings

```csharp
using Aurigma.GraphicsMill.Transforms;
```

## Code Snippet

```csharp
using (var bitmap = new Bitmap("Chicago.jpg"))
{
    bitmap.Transforms.Resize(320, 0, ResizeInterpolationMode.High);
    bitmap.Save("Resize.jpg");
}
```

## Explanation

The code:

- Loads the image from file.
- Applies the "Resize" transform with a width of 320 pixels and automatic height adjustment (aspect ratio preserved), using high-quality interpolation.
- Saves the resized image to a file.

## Tags

- [Bitmap](<https://www.graphicsmill.com/samples/tags/bitmap_md>): Working with images via the Bitmap API
- [Resize](<https://www.graphicsmill.com/samples/tags/resize_md>): Resizing images

## Input

- [Chicago.jpg](<https://www.graphicsmill.com/samples/Transforms/compiled/Debug/Chicago_jpg>) (preview)

## Output

- [Resize.jpg](<https://www.graphicsmill.com/samples/Transforms/compiled/Debug/Resize_jpg>) (preview)

## Used APIs

- [Aurigma.GraphicsMill.Bitmap.Transforms](<https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Bitmap_Transforms.htm.md>)
- [Aurigma.GraphicsMill.Transforms.ResizeInterpolationMode](<https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_ResizeInterpolationMode.htm.md>)
- [Aurigma.GraphicsMill.TransformsProvider.Resize(Int32,Int32,ResizeInterpolationMode)](<https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_TransformsProvider_Resize_3_db5aa34c.htm.md>)
