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.
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.
|
Inherited Methods
Public Constructors
public Builder ()
Public Methods
public final ImageProcessingOptions build ()
Validates and builds the ImageProcessingOptions
instance.
Throws
IllegalArgumentException | if some of the provided values do not meet their requirements. |
---|
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.
Parameters
value |
---|
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.
Parameters
value |
---|