# extractRoi method

DocumentImage extractRoi(

1. Rectangle bounds

)

Extracts a region of interest in the image according to the given bounds.

param bounds Bounds of the crop to extract. return The extracted region of interest. throws DocumentException An error has occurred during Document Library execution.

## Implementation

    DocumentImage extractRoi(Rectangle bounds) {
      DocumentImage documentImageRoi = DocumentImage();
      var err = documentSDK.id3DocumentImage_ExtractRoi(_pHandle.value, bounds.handle, documentImageRoi.handle);
      if (err != DocumentError.success.value) {
        documentImageRoi.dispose();
        throw DocumentException(err);
      }
      return documentImageRoi;
    }