---
title: Crop
summary: Crop removes pixels from an image.
url: https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/fsthttp/imageopto/struct.Crop/
---

**Kind:** Struct  
**Module:** [imageopto](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/fsthttp/imageopto/)  
**Package:** compute-sdk-go v1.11.0  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/imageopto/imageopto.go#L212

```go
type Crop struct {
	Size Area

	Position *Position

	Mode CropMode
}
```

Crop removes pixels from an image.

## Fields

### Size

**Type:** `Area`

Size is the desired width and height.

### Position

**Type:** `*Position`

Position is the offset for determining the starting position of the cropped region.

### Mode

**Type:** `CropMode`

Mode is the crop mode to use.

## Methods

### String

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/fsthttp/imageopto/imageopto.go#L233

```go
func (c *Crop) String() string
```

**Returns**

`string`
