---
title: "Crop image in C# .NET: Crop area, sides, background | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/editor/manipulation/crop/"
md_url: "https://www.nutrient.io/guides/dotnet/editor/manipulation/crop.md"
last_updated: "2026-05-21T17:12:02.203Z"
description: "Learn how to crop images programmatically in C# .NET using Nutrient .NET SDK. Precisely extract desired portions of images in your applications."
---

# Crop images in C# .NET

To crop images, use the following methods:

- [`Crop`](#cropping-an-image) crops an image by specifying coordinates and dimensions.

- [`CropTop, CropRight, CropBottom, CropLeft`](#cropping-individual-sides) crops the individual sides of an image.

- [`CropBorders`](#cropping-an-image-background) removes an image background of any color.

- [`CropBorders`](#getting-crop-area-dimensions) with reference parameters gets the dimensions of the image background.

- [`CropWhiteBorders`](#cropping-a-white-background) removes a white image background.

- [`CropBlackBorders`](#cropping-a-black-background) removes a black image background.

- [`CropBlackBordersEx`](#changing-a-black-background-color) changes a black image background to white.

- [`DeleteBlackBorders`](#changing-a-black-background-color-for-irregular-shapes) removes a black image background with irregular shapes.

## Cropping an image

To crop an image, use the [`Crop`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~Crop.html) method. The input parameters are the following:

- The coordinates of the top-left corner of the cropped area.

- The width of the cropped area.

- The height of the cropped area.

The origin of the coordinate system is the top-left corner of the original image.

To crop an image by 5 percent on all sides, use the following example:

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int imageID = gdpictureImaging.CreateGdPictureImageFromFile(@"C:\temp\source.jpg");
int height = gdpictureImaging.GetHeight(imageID);
int width = gdpictureImaging.GetWidth(imageID);
// Crop the image by 5 percent on all sides.
gdpictureImaging.Crop(imageID, width * 5 / 100, height * 5 / 100, width * 90 / 100, height * 90 / 100);
gdpictureImaging.SaveAsPNG(imageID, @"C:\temp\output.png");
gdpictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim imageID As Integer = gdpictureImaging.CreateGdPictureImageFromFile("C:\temp\source.jpg")
    Dim height As Integer = gdpictureImaging.GetHeight(imageID)
    Dim width As Integer = gdpictureImaging.GetWidth(imageID)
    ' Crop the image by 5 percent on all sides.
    gdpictureImaging.Crop(imageID, width * 5 / 100, height * 5 / 100, width * 90 / 100, height * 90 / 100)
    gdpictureImaging.SaveAsPNG(imageID, "C:\temp\output.png")
    gdpictureImaging.ReleaseGdPictureImage(imageID)
End Using

```

#### Used methods

- [`CreateGdPictureImageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateGdPictureImageFromFile.html)

- [`Crop`]

- [`GetHeight`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~GetHeight.html)

- [`GetWidth`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~GetWidth.html)

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

- [`SaveAsPNG`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~SaveAsPNG.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)

## Cropping individual sides

To crop an image from an individual side, use the following methods:

- [`CropTop`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CropTop.html)

- [`CropRight`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CropRight.html)

- [`CropBottom`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CropBottom.html)

- [`CropLeft`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CropLeft.html)

Use the `Lines` parameter to specify how many pixels to crop.

To crop an image from the bottom by 5 percent, use the following code:

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int imageID = gdpictureImaging.CreateGdPictureImageFromFile(@"C:\temp\source.jpg");
int height = gdpictureImaging.GetHeight(imageID);
// Crop the image by 5 percent from the bottom.
gdpictureImaging.CropBottom(imageID, height * 5 / 100);
gdpictureImaging.SaveAsPNG(imageID, @"C:\temp\output.png");
gdpictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim imageID As Integer = gdpictureImaging.CreateGdPictureImageFromFile("C:\temp\source.jpg")
    Dim height As Integer = gdpictureImaging.GetHeight(imageID)
    ' Crop the image by 5 percent from the bottom.
    gdpictureImaging.CropBottom(imageID, height * 5 / 100)
    gdpictureImaging.SaveAsPNG(imageID, "C:\temp\output.png")
    gdpictureImaging.ReleaseGdPictureImage(imageID)
End Using

```

#### Used methods

- [`CreateGdPictureImageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateGdPictureImageFromFile.html)

- [`CropBottom`]

- [`GetHeight`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~GetHeight.html)

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

- [`SaveAsPNG`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~SaveAsPNG.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)

## Cropping an image background

The [`CropBorders`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CropBorders.html) method detects and removes the background of an image of any color. It accepts the following parameters:

- [`ImigingContext`](#imaging-context) sets the image type.

- Optional: [`Confidence`](#confidence-level) sets the confidence level for deleting a single line of a background.

- Optional: [`ReferencePoint`](#reference-point) sets the color reference for determining the dominant background color.

To delete the background of an image, use the following code:

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int imageID = gdpictureImaging.CreateGdPictureImageFromFile(@"C:\temp\source.jpg");
// Detect and remove the background of a photo image.
gdpictureImaging.CropBorders(imageID, ImagingContext.ContextPhoto);
gdpictureImaging.SaveAsPNG(imageID, @"C:\temp\output.png");
gdpictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim imageID As Integer = gdpictureImaging.CreateGdPictureImageFromFile("C:\temp\source.jpg")
    ' Detect and remove the background of a photo image.
    gdpictureImaging.CropBorders(imageID, ImagingContext.ContextPhoto)
    gdpictureImaging.SaveAsPNG(imageID, "C:\temp\output.png")
    gdpictureImaging.ReleaseGdPictureImage(imageID)
End Using

```

#### Used methods

- [`CreateGdPictureImageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateGdPictureImageFromFile.html)

- [`CropBorders`]

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

- [`SaveAsPNG`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~SaveAsPNG.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)

## Getting crop area dimensions

To get the dimensions of the cropped area, use the [`CropBorders`](#cropping-an-image-background) method and the following reference parameters:

- `Left` is the X coordinate of the top-left corner.

- `Top` is the Y coordinate of the top-left corner.

- `Width` is the width of the cropped area.

- `Height` is the height of the cropped area.

The origin of the coordinate system is the top-left corner of the original image.

If you reference the listed parameters, the `CropBorders` method only detects the crop area and calculates the cropped area. It doesn’t delete the background. The `CropBorders` method accepts the following parameters:

- [`Confidence`](#confidence-level) sets the confidence level for deleting a single line of a background.

- [`ReferencePoint`](#reference-point) sets the color reference for determining the dominant background color.

- Optional: [`ImigingContext`](#imaging-context) sets the image type.

To get the dimensions of the cropped area, use the following code:

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int imageID = gdpictureImaging.CreateGdPictureImageFromFile(@"C:\temp\source.jpg");
int left = 0, top = 0, width = 0, height = 0;
// Detect the crop area with 50 percent confidence level.
gdpictureImaging.CropBorders(imageID, 50, ReferencePoint.ReferencePointBottomRight,
    ref left, ref top, ref width, ref height);
Console.WriteLine(left + ", " + top + ", " + width + ", " + height);
gdpictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim imageID As Integer = gdpictureImaging.CreateGdPictureImageFromFile("C:\temp\source.jpg")
    Dim left = 0, top = 0, width = 0, height = 0
    ' Detect the crop area with 50 percent confidence level.
    gdpictureImaging.CropBorders(imageID, 50, ReferencePoint.ReferencePointBottomRight,
        left, top, width, height)
    Console.WriteLine(left & ", " & top & ", " & width & ", " & height)
    gdpictureImaging.ReleaseGdPictureImage(imageID)
End Using

```

#### Used methods

- [`CreateGdPictureImageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateGdPictureImageFromFile.html)

- [`CropBorders`]

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

#### Related Topics

- [Load a File](/guides/dotnet/load-a-file.md)

## Cropping a white background

The [`CropWhiteBorders`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CropWhiteBorders.html) method detects and removes the white background of an image. It accepts the following parameters:

- [`Confidence`](#confidence-level) sets the confidence level for deleting a single line of a background.

- [`SkipLinesCount`](#skipping-lines) specifies how many lines to skip.

To delete the white background of an image, use the following code:

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int imageID = gdpictureImaging.CreateGdPictureImageFromFile(@"C:\temp\source.jpg");
// Detect and remove the white background.
gdpictureImaging.CropWhiteBorders(imageID);
gdpictureImaging.SaveAsPNG(imageID, @"C:\temp\output.png");
gdpictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim imageID As Integer = gdpictureImaging.CreateGdPictureImageFromFile("C:\temp\source.jpg")
    ' Detect and remove the white background.
    gdpictureImaging.CropWhiteBorders(imageID)
    gdpictureImaging.SaveAsPNG(imageID, "C:\temp\output.png")
    gdpictureImaging.ReleaseGdPictureImage(imageID)
End Using

```

#### Used methods

- [`CreateGdPictureImageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateGdPictureImageFromFile.html)

- [`CropWhiteBorders`]

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

- [`SaveAsPNG`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~SaveAsPNG.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)

## Cropping a black background

The [`CropBlackBorders`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CropBlackBorders.html) method detects and removes the black background of an image. It accepts the following parameters:

- [`Confidence`](#confidence-level) sets the confidence level for deleting a single line of a background.

- [`SkipLinesCount`](#skipping-lines) specifies how many lines to skip.

To delete the black background of an image, use the following code:

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int imageID = gdpictureImaging.CreateGdPictureImageFromFile(@"C:\temp\source.jpg");
// Detect and remove the black background.
gdpictureImaging.CropBlackBorders(imageID);
gdpictureImaging.SaveAsPNG(imageID, @"C:\temp\output.png");
gdpictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim imageID As Integer = gdpictureImaging.CreateGdPictureImageFromFile("C:\temp\source.jpg")
    ' Detect and remove the black background.
    gdpictureImaging.CropBlackBorders(imageID)
    gdpictureImaging.SaveAsPNG(imageID, "C:\temp\output.png")
    gdpictureImaging.ReleaseGdPictureImage(imageID)
End Using

```

#### Used methods

- [`CreateGdPictureImageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateGdPictureImageFromFile.html)

- [`CropBlackBorders`]

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

- [`SaveAsPNG`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~SaveAsPNG.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)

## Changing a black background color

To change the black background color to white, use the [`CropBlackBordersEx`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CropBlackBordersEx.html) method. It doesn’t remove the background, which means that the dimensions of the image are kept. This method uses two optional parameters:

- [`Confidence`](#confidence-level) sets the confidence level for deleting a single line of a background.

- [`SkipLinesCount`](#skipping-lines) specifies how many lines to skip.

This method only detects rectangular backgrounds. For irregular shapes, use the [`DeleteBlackBorders`](#changing-a-black-background-color-for-irregular-shapes) method.

To change the black background of an image to white, use the following code:

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int imageID = gdpictureImaging.CreateGdPictureImageFromFile(@"C:\temp\source.jpg");
// Detect and change the background color to white.
gdpictureImaging.CropBlackBordersEx(imageID);
gdpictureImaging.SaveAsPNG(imageID, @"C:\temp\output.png");
gdpictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim imageID As Integer = gdpictureImaging.CreateGdPictureImageFromFile("C:\temp\source.jpg")
    ' Detect and change the background color to white.
    gdpictureImaging.CropBlackBordersEx(imageID)
    gdpictureImaging.SaveAsPNG(imageID, "C:\temp\output.png")
    gdpictureImaging.ReleaseGdPictureImage(imageID)
End Using

```

#### Used methods

- [`CreateGdPictureImageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateGdPictureImageFromFile.html)

- [`CropBlackBordersEx`]

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

- [`SaveAsPNG`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~SaveAsPNG.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)

## Changing a black background color for irregular shapes

The [`DeleteBlackBorders`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~DeleteBlackBorders.html) method is used for images with an irregular black background. The `Margin` parameter works as a safety buffer, and it sets the maximum distance in pixels from the edges of the image where a border is allowed to start. The default value is `10`. Set the `SkewedBorders` parameter to `true` to handle irregular shapes.

To delete a black background with an irregular shape, use the following code:

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int imageID = gdpictureImaging.CreateGdPictureImageFromFile(@"C:\temp\source.jpg");
// Replace the black background from a skewed image by replacing it with white content.
// The maximum distance from edges of an image where a border is allowed to start is 20 pixels.
gdpictureImaging.DeleteBlackBorders(imageID, Margin:20, SkewedBorders:true);
gdpictureImaging.SaveAsPNG(imageID, @"C:\temp\output.png");
gdpictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim imageID As Integer = gdpictureImaging.CreateGdPictureImageFromFile("C:\temp\source.jpg")
    ' Replace the black background from a skewed image by replacing it with white content.
    ' The maximum distance from edges of an image where a border is allowed to start is 20 pixels.
    gdpictureImaging.DeleteBlackBorders(imageID, Margin:=20, SkewedBorders:=True)
    gdpictureImaging.SaveAsPNG(imageID, "C:\temp\output.png")
    gdpictureImaging.ReleaseGdPictureImage(imageID)
End Using

```

#### Used methods

- [`CreateGdPictureImageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateGdPictureImageFromFile.html)

- [`DeleteBlackBorders`]

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

- [`SaveAsPNG`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~SaveAsPNG.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)

## Confidence level

Use the `Confidence` parameter to set the confidence level of the following methods:

- [`CropBorders`](#cropping-an-image-background)

- [`CropBlackBorders`](#cropping-a-black-background)

- [`CropBlackBordersEx`](#changing-a-black-background-color)

- [`CropWhiteBorders`](#cropping-a-white-background)

If the line exceeds the specified confidence level, it’s removed or modified. Otherwise, it’s left untouched. The `Confidence` parameter ranges between 0 and 100 percent. The default value is `75`.

To lower the confidence level of the `CropBlackBorders` method to 50 percent, use the following code:

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int imageID = gdpictureImaging.CreateGdPictureImageFromFile(@"C:\temp\source.jpg");
// Detect and remove the background with 50 percent confidence level.
gdpictureImaging.CropBlackBorders(imageID, 50);
gdpictureImaging.SaveAsPNG(imageID, @"C:\temp\output.png");
gdpictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim imageID As Integer = gdpictureImaging.CreateGdPictureImageFromFile("C:\temp\source.jpg")
    ' Detect and remove the background with 50 percent confidence level.
    gdpictureImaging.CropBlackBorders(imageID, 50)
    gdpictureImaging.SaveAsPNG(imageID, "C:\temp\output.png")
    gdpictureImaging.ReleaseGdPictureImage(imageID)
End Using

```

#### Used methods

- [`CreateGdPictureImageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateGdPictureImageFromFile.html)

- [`CropBlackBorders`]

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

- [`SaveAsPNG`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~SaveAsPNG.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)

## Skipping lines

Use the `SkipLinesCount` parameter to specify how many lines to skip when using one of the following methods:

- [`CropBlackBorders`](#cropping-a-black-background)

- [`CropBlackBordersEx`](#changing-a-black-background-color)

- [`CropWhiteBorders`](#cropping-a-white-background)

To use this parameter, specify the [`Confidence`](#confidence-level) parameter:

### C#

```csharp

using GdPictureImaging gdpictureImaging = new GdPictureImaging();
int imageID = gdpictureImaging.CreateGdPictureImageFromFile(@"C:\temp\source.jpg");
// Detect and remove the background with 75 percent confidence level and skip 3 lines.
gdpictureImaging.CropBlackBorders(imageID, Confidence:75, SkipLinesCount:3);
gdpictureImaging.SaveAsPNG(imageID, @"C:\temp\output.png");
gdpictureImaging.ReleaseGdPictureImage(imageID);

```

### VB.NET

```vb

Using gdpictureImaging As GdPictureImaging = New GdPictureImaging()
    Dim imageID As Integer = gdpictureImaging.CreateGdPictureImageFromFile("C:\temp\source.jpg")
    ' Detect and remove the background with 75 percent confidence level and skip 3 lines.
    gdpictureImaging.CropBlackBorders(imageID, Confidence:=75, SkipLinesCount:=3)
    gdpictureImaging.SaveAsPNG(imageID, "C:\temp\output.png")
    gdpictureImaging.ReleaseGdPictureImage(imageID)
End Using

```

#### Used methods

- [`CreateGdPictureImageFromFile`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~CreateGdPictureImageFromFile.html)

- [`CropBlackBorders`]

- [`ReleaseGdPictureImage`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~ReleaseGdPictureImage.html)

- [`SaveAsPNG`](/api/gdpicture/GdPicture.NET.14~GdPicture14.GdPictureImaging~SaveAsPNG.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)

## Reference point

Use the `ReferencePoint` parameter to specify the dominant color of the background of the image. The possible values are the following:

- `ReferencePointBottomLeft`

- `ReferencePointBottomRight`

- `ReferencePointTopLeft`

- `ReferencePointTopRight`

The following functionalities can use this parameter:

- [Crop Background](#cropping-an-image-background)

- [Get Crop Area Dimensions](#getting-crop-area-dimensions)

## Imaging context

Use the `ImigingContext` parameter to specify the image type. The possible values are the following:

- `ContextDocument`

- `ContextPhoto`

- `ContextUnknown`

The following methods can use this parameter:

- [`CropBorders`](#cropping-an-image-background)
---

## Related pages

- [Extract pages from a PDF in C#](/guides/dotnet/editor/manipulation/extract.md)
- [Replace colors in an image](/guides/dotnet/editor/manipulation/replace-colors-from-image.md)
- [Image filters using C# .NET](/guides/dotnet/editor/manipulation/filters.md)
- [Blur images in C# .NET](/guides/dotnet/editor/manipulation/blur.md)
- [Set image or PDF colors in C#](/guides/dotnet/editor/manipulation/colors.md)
- [PDF and image manipulation in C# .NET](/guides/dotnet/editor/manipulation.md)
- [Remove pages from PDFs in C#](/guides/dotnet/editor/manipulation/remove-page.md)
- [Rotate images and PDFs in C# .NET](/guides/dotnet/editor/manipulation/rotate.md)
- [Move or copy PDF pages and TIFF images in C#](/guides/dotnet/editor/manipulation/move-or-copy-page.md)

