---
title: "Crop Constructor (Int32, Int32, Int32, Int32, Color)"
canonical: https://www.graphicsmill.com/docs/gm5/C_Aurigma_GraphicsMill_Transforms_Crop_ctor_5_6c07be03.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/)

# Crop Constructor (Int32, Int32, Int32, Int32, Color)
 
Creates new [Crop](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Crop.htm.md) class instance. You are specifying cropping rectangle and background color here.
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Sub New ( _x As Integer, _y As Integer, _width As Integer, _height As Integer, _backgroundColor As Color _
)
```
 
```csharp
public Crop(int x,int y,int width,int height,Color backgroundColor
)
```
 
### Parameters
 
 - x
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
X-coordinate for the left upper corner of the cropping rectangle. It can be changed later via [Rectangle](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_Crop_Rectangle.htm.md) (using [X](http://msdn2.microsoft.com/en-us/y30b3df9) property).

 - y
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
Y-coordinate for the left upper corner of the cropping rectangle. It can be changed later via [Rectangle](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_Crop_Rectangle.htm.md) (using [Y](http://msdn2.microsoft.com/en-us/092w5k6s) property).

 - width
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
Width of the cropping rectangle. It can be changed later via [Rectangle](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_Crop_Rectangle.htm.md) (using [Width](http://msdn2.microsoft.com/en-us/928ay19x) property).

 - height
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
Height of the cropping rectangle. It can be changed later via [Rectangle](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_Crop_Rectangle.htm.md) (using [Height](http://msdn2.microsoft.com/en-us/83c1ytk5) property).

 - backgroundColor
     - Type: [Aurigma.GraphicsMill.Color](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Color.htm.md)
Crop background color value. If its color space does not conform pixel format of target bitmap, it is converted to bitmap color space. You can change it later through property [BackgroundColor](https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Transforms_Crop_BackgroundColor.htm.md).
   
## See Also

### Reference

- [Crop Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Crop.htm.md)
- [Crop Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Transforms_Crop_ctor.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill_Transforms.htm.md)
