---
title: "AutoCrop Class"
canonical: https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Transforms_AutoCrop.htm
product: "Graphics Mill"
---

# AutoCrop Class
 
Removes a border around an image in the automatic mode.
 
**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 AutoCrop : Transform
```
 
## Remarks
  
This transform supports two settings:
 
- **[BorderColor](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Transforms_AutoCrop_BorderColor.htm.md)** The color of the border to remove.
- **[Threshold](https://www.graphicsmill.com/docs/gm/P_Aurigma_GraphicsMill_Transforms_AutoCrop_Threshold.htm.md)** The sensitivity of the auto crop. The higher the value the more color will be cropped.
 
## Examples
  
```csharp
using (var bitmap = new Bitmap(@"Images\in.jpg"))
using (var autoCrop = new AutoCrop(RgbColor.Brown))
{
    autoCrop.Threshold = 0.7f;
    using (var result = autoCrop.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.AutoCrop
   
## See Also

### Reference

- [AutoCrop Members](https://www.graphicsmill.com/docs/gm/AllMembers_T_Aurigma_GraphicsMill_Transforms_AutoCrop.htm.md)
- [Aurigma.GraphicsMill.Transforms Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill_Transforms.htm.md)
