crop method
Future<Result<ImageRef> >
crop(
- ImageRef image,
- List<
Point< polygon, {double> > - DocumentCropOptimization? documentCropOptimization,
Crops the image to the given polygon area.
image - Reference of the image to be cropped.
polygon - Polygon defining the area to be cropped. Points needs to be represented in percentage values (0.0 - 1.0) and the order should be top-left, top-right, bottom-right, bottom-left.
documentCropOptimization - The optimization to apply when cropping a document. The method doesn't actually check if the input is a document photo, so it relies entirely on the caller's intent. Default is OPTIMIZE_QUAD.
Returns a Future that completes with reference of the cropped image.
Implementation
Future<Result<ImageRef>> crop(ImageRef image, List<Point<double>> polygon,
{DocumentCropOptimization? documentCropOptimization}) {
return ScanbotImageProcessorImpl.crop(
image, polygon, documentCropOptimization);
}