# crop method

DocumentImage crop(

1. int left,
2. int top,
3. int width,
4. int height

)

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

param left Left bound of the crop to extract. param top Top bound of the crop to extract. param width Width of the crop to extract. param height Height of the crop to extract. return The extracted region of interest. throws DocumentException An error has occurred during Document Library execution.

## Implementation

    DocumentImage crop(int left, int top, int width, int height) {
      DocumentImage documentImageCrop = DocumentImage();
      var err = documentSDK.id3DocumentImage_Crop(_pHandle.value, left, top, width, height, documentImageCrop.handle);
      if (err != DocumentError.success.value) {
        documentImageCrop.dispose();
        throw DocumentException(err);
      }
      return documentImageCrop;
    }