---
title: "TransformsProvider..::.Resize Method (Int32, Int32)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_TransformsProvider_Resize_2_22dcb54d.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# TransformsProvider.Resize Method (Int32, Int32)
 
Resizes the image.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Sub Resize ( _width As Integer, _height As Integer _
)
```
 
```csharp
public void Resize(int width,int height
)
```
 
### Parameters
 
 - width
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
Width of resized bitmap. If it equals to 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](http://msdn2.microsoft.com/en-us/td2s409d)
Height of resized bitmap. If it equals to 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.
 
## Remarks
 You can also use [Resize](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Resize.htm.md) class to apply this transform.
 
## Examples
  
```
'Resize image proportionally to width 100
bitmap.Transforms.Resize(100, 0)

'Resize image proportionally to height 100
'bitmap.Transforms.Resize(0, 100)

'Resize image to make both width and height equal 100 
'(don't constrain proportions)
'bitmap.Transforms.Resize(100, 100)
```
 
```csharp
//Resize image proportionally to width 100
bitmap.Transforms.Resize(100, 0);

//Resize image proportionally to height 100
//bitmap.Transforms.Resize(0, 100);

//Resize image to make both width and height equal 100 
//(don't constrain proportions)
//bitmap.Transforms.Resize(100, 100);
```
   
## See Also

### Reference

- [TransformsProvider Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_TransformsProvider.htm.md)
- [Resize Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_TransformsProvider_Resize.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
