---
title: "Resize Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Resize.htm
product: "Graphics Mill"
---

# Resize Class
 
Resizes an image.
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public sealed class Resize : Transform
```
 
## Remarks
  
Using this class you may resample the bitmap: specify [Width](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Transforms_Resize_Width.htm.md) and [Height](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Transforms_Resize_Height.htm.md) properties, then apply the transform, and it will return resized bitmap. If you set some of these properties to 0, this property is automatically calculated to preserve the aspect ratio of the image.
 
Essential parameter of all the geometric transforms (including resizing) is an interpolation algorithm. It specifies how to calculate intermediate points. Different algorithms produces different quality, but as usual the higher quality it produces, the slower algorithm works. You can select interpolation algorithm with [InterpolationMode](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Transforms_Resize_InterpolationMode.htm.md) property.
 
## Examples
  
The following code proportionally resizes an image to 100 pixel width.
 
```csharp
using (var bitmap = new Bitmap(@"Images\in.jpg"))
using (var resize = new Resize(100, 100))
{
    resize.InterpolationMode = ResizeInterpolationMode.High;
    resize.ResizeMode = ResizeMode.Fit;
    using (var result = resize.Apply(bitmap))
        result.Save(@"Images\Output\out.jpg");
}
```
 
## Inheritance Hierarchy
  
- System.Object
    - [Aurigma.GraphicsMill.PipelineElement](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_PipelineElement.htm.md)
        - [Aurigma.GraphicsMill.Transforms.Transform](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Transform.htm.md)
            - Aurigma.GraphicsMill.Transforms.Resize
 
## Thread Safety
 Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
   
## See Also

### Reference

- [Resize Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Transforms_Resize.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)

### Manual

- [Resizing and Cropping Images](https://www.graphicsmill.com/docs/gm/resizing-and-cropping-images.htm.md)
