---
title: "Crop Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Crop.htm
product: "Graphics Mill"
---

# Crop Class
 
Crops an image.
 
**Namespace:** [Aurigma.GraphicsMill.Transforms](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public sealed class Crop : Transform
```
 
## Remarks
  
Crop transform returns pixels which are inside of the *cropping rectangle* (see [Rectangle](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Transforms_Crop_Rectangle.htm.md) property).
 
## Examples
  
The following code crops a 50\*100 pixels rectangle from an image and saves the result in JPEG format.
 
```csharp
using (var bitmap = new Bitmap(@"Images\in.jpg"))
{
    var cropRectangle = new System.Drawing.Rectangle(50, 60, 50, 100);

    using (var crop = new Crop(cropRectangle))
    using (var result = crop.Apply(bitmap))
        result.Save(@"Images\Output\out.jpg");
}
```
 
## Inheritance Hierarchy
  
- System.Object
    - [Aurigma.GraphicsMill.PipelineElement](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_PipelineElement.htm.md)
        - [Aurigma.GraphicsMill.Transforms.Transform](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_Transform.htm.md)
            - Aurigma.GraphicsMill.Transforms.Crop
 
## Thread Safety
 Static members of this type are not safe for multi-threaded operations. Instance members of this type are not safe for multi-threaded operations.
   
## See Also

### Reference

- [Crop Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Transforms_Crop.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)

### Manual

- [Resizing and Cropping Images](https://www.graphicsmill.com/docs/gm/resizing-and-cropping-images.htm.md)
