# TransformsProvider.Resize Method (Int32, Int32, ResizeInterpolationMode, ResizeMode)

Resizes the bitmap to the specified dimensions using a given interpolation algorithm and resize mode.

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

## Syntax

C#
public void Resize(
int width,
int height,
ResizeInterpolationMode interpolationMode,
ResizeMode resizeMode
)

### Parameters

width

Type: System.Int32

The width of resized bitmap. If 0, it is calculated automatically to preserve the aspect ratio of the source image. Both width and height cannot be 0 at the same time.
height

Type: System.Int32

The height of resized bitmap. If 0, it is calculated automatically to preserve the aspect ratio of the source image. Both width and height cannot be 0 at the same time.
interpolationMode
A ResizeInterpolationMode interpolation algorithm which used during the resize.
resizeMode
A ResizeMode which specifies how to interpret the resize dimensions.

## Remarks

You can also use Resize class to apply this transform.

Note

If certain values of resizeMode are specified, width and height of the result bitmap may be different than width and height arguments.

## Examples

C#
using (var bitmap = new Bitmap(@"Images\in.jpg"))
{
bitmap.Transforms.Resize(100, 0, ResizeInterpolationMode.High, ResizeMode.Fit);
bitmap.Save(@"Images\Output\out.jpg");
}