Image Cropping | Flutter Document Scanner
The Scanbot SDK provides the ability to crop, rotate and perform perspective correction on the source images.
The Image cropping functionality is available both as an RTU-UI and as a classic component.
RTU-UI Component
The Scanbot SDK allows users to leverage our advanced Crop Screen to detect a document on an existing image and also provides a nice UI experience for manually adjusting the detected polygon's corners. This is particularly useful when users want to apply precise cropping to a document photo already available on their device.
loading...
Classic Component
Integration of Cropping Components
Use the ScanbotCroppingWidget
and CroppingController
classes to integrate and customize
the Cropping Classic Component for handling page objects within your app.
Quick Start Guide
Here's how you can integrate ScanbotCroppingWidget
into your widget tree:
CroppingController? croppingController;
ScanbotCroppingWidget(
page: page, // Page object to be cropped
onViewReady: (controller) {
// Callback when the cropping view is ready
croppingController = controller;
},
onHeavyOperationProcessing: (isProcessing) {
// Callback for handling long processing operations
},
edgeColor: Colors.red, // Color of the cropping edges
edgeColorOnLine: Colors.blue, // Color when edges are on the line
anchorPointsColor: Colors.amberAccent, // Color of anchor points
borderInsets: sdk.Insets.all(16), // Insets for the cropping borders
)
ScanbotCroppingWidget
CroppingController
Classic Crop UI Component: Example
For a fully functional example, please see our example app scanbot-sdk-example-flutter on GitHub.
Want to scan longer than one minute?
Generate a free trial license to test the Scanbot SDK thoroughly.
Get your free Trial LicenseWhat do you think of this documentation?
What can we do to improve it? Please be as detailed as you like.