---
title: "TransformsProvider.Crop Method (Int32, Int32, Int32, Int32)"
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_TransformsProvider_Crop_4_951ae041.htm
archived: false
applies_to:
  - product: "Graphics Mill"
    versions: ["12.1", "6.x-12.x (may differ)"]
    entity_id: "https://www.graphicsmill.com/#software-application"
---

# TransformsProvider.Crop Method (Int32, Int32, Int32, Int32)

**Applies to:** Graphics Mill 12.1, 6.x-12.x (may differ)
 
Crops the bitmap using specified rectangle (which is not obligatory totally inside the bitmap).
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public void Crop(int x,int y,int width,int height
)
```
 
### Parameters
 
 - x
     - Type: System.Int32
The x-coordinate of the upper-left corner of the cropping rectangle.

 - y
     - Type: System.Int32
The y-coordinate of the upper-left corner of the cropping rectangle.

 - width
     - Type: System.Int32
The width of the cropping rectangle.

 - height
     - Type: System.Int32
The height of the cropping rectangle.
 
## Remarks
 You can also use [Crop](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Crop.htm.md) class to crop the image.
 
## Examples
  
```csharp
using (var bitmap = new Bitmap(@"Images\in.jpg"))
{
    bitmap.Transforms.Crop(50, 60, 50, 100);
    bitmap.Save(@"Images\Output\out.jpg");
}
```
   
## See Also

### Reference

- [TransformsProvider Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_TransformsProvider.htm.md)
- [Crop Overload](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_TransformsProvider_Crop.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)

### Manual

- [Resizing and Cropping Images](https://www.graphicsmill.com/docs/gm/resizing-and-cropping-images.htm.md)
