# ImageProcessingOptions.Builder

```
public abstract class ImageProcessingOptions.Builder
```

*** ** * ** ***

Builder for `ImageProcessingOptions`.

If both region-of-interest and rotation are specified, the crop around the region-of-interest is extracted first, then the specified rotation is applied to the crop.

## Summary

| ### Public constructors |
|---|
| `Builder()` |

| ### Public methods |
|---|---|
| `final ImageProcessingOptions` | `build()` Validates and builds the `ImageProcessingOptions` instance. |
| `abstract ImageProcessingOptions.Builder` | `setRegionOfInterest(RectF value)` Sets the optional region-of-interest to crop from the image. |
| `abstract ImageProcessingOptions.Builder` | `setRotationDegrees(int value)` Sets the rotation to apply to the image (or cropped region-of-interest), in degrees clockwise. |

## Public constructors

### Builder

```
public Builder()
```

## Public methods

### build

```
public final ImageProcessingOptions build()
```

Validates and builds the `ImageProcessingOptions` instance.

| Throws |
|---|---|
| `java.lang.IllegalArgumentException` | if some of the provided values do not meet their requirements. |

### setRegionOfInterest

```
public abstract ImageProcessingOptions.Builder setRegionOfInterest(RectF value)
```

Sets the optional region-of-interest to crop from the image. If not specified, the full image is used.

Coordinates must be in \[0,1\], `left` must be \<`right` and `top` must be \<`bottom`, otherwise an IllegalArgumentException will be thrown when `build` is called.

### setRotationDegrees

```
public abstract ImageProcessingOptions.Builder setRotationDegrees(int value)
```

Sets the rotation to apply to the image (or cropped region-of-interest), in degrees clockwise. Defaults to 0.

The rotation must be a multiple (positive or negative) of 90°, otherwise an IllegalArgumentException will be thrown when `build` is called.