---
title: "TransformsProvider.AutoCrop Method (Color, Single)"
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_TransformsProvider_AutoCrop_2_d079cd70.htm
product: "Graphics Mill"
---

# TransformsProvider.AutoCrop Method (Color, Single)
 
Removes a border around an image in the automatic mode.
 
**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 AutoCrop(Color borderColor,float threshold
)
```
 
### Parameters
 
 - borderColor
     - Type: [Aurigma.GraphicsMill.Color](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_Color.htm.md)
The color of the border to remove.

 - threshold
     - Type: System.Single
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"))
{
    bitmap.Transforms.AutoCrop(RgbColor.Brown, 0.7f);
    bitmap.Save(@"Images\Output\out.jpg");
}
```
   
## See Also

### Reference

- [TransformsProvider Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_TransformsProvider.htm.md)
- [AutoCrop Overload](https://www.graphicsmill.com/docs/gm/O_T_Aurigma_GraphicsMill_TransformsProvider_AutoCrop.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
