---
title: "TransformsProvider..::.Crop Method (Rectangle, Color)"
canonical: https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_TransformsProvider_Crop_2_bd474501.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.Crop Method (Rectangle, Color)
 
Crops the image using specified rectangle (which is not obligatory totally inside the bitmap).
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Sub Crop ( _rect As Rectangle, _backgroundColor As Color _
)
```
 
```csharp
public void Crop(Rectangle rect,Color backgroundColor
)
```
 
### Parameters
 
 - rect
     - Type: [System.Drawing.Rectangle](http://msdn2.microsoft.com/en-us/1zk39146)
Cropping rectangle.

 - backgroundColor
     - Type: [Aurigma.GraphicsMill.Color](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Color.htm.md)
Background color which is used when cropping rectangle takes pixels which are out of the image.
 
## Remarks
 You can also use [Crop](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Transforms_Crop.htm.md) class to crop the image.
   
## See Also

### Reference

- [TransformsProvider Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_TransformsProvider.htm.md)
- [Crop Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_TransformsProvider_Crop.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
