The main purpose of PR is to solve the issue #987 - Crop feature similar to cam scanner. Code changes can be found in the ImageToPdfFragment class. My implementation steps are:
Selecting Images: Images are selected from the device using the Matisse library. The selected image is fetched via Matisse.obtainResult(data) and stored as a list of URIs.
Logic for cropping images: After the user selects an image, a dialogue box pops up asking if the user wants to crop the image. If user selects "Yes", then cropImage(Uri.parse(mImagesUri.get(mImageCounter))) method will be executed for the first image.
Working with cropped images: Use the CropImage library for cropping. After cropping, receive the cropped image in onActivityResult. Update the path of the image at the corresponding location in the mImagesUri collection by converting the Uri in the CropImage.ActivityResult object to a string.
Iterative Cropping Process: After cropping on image at a time, check if there are more images to be cropped. If there are, use cropImage(Uri.parse(mImagesUri.get(mImageCounter))) method to continue cropping the next image. When all images are cropped, update the interface to reflect the cropped image.
Fixes #987
Type of change
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
How Has This Been Tested?
[x] ./gradlew assembleDebug assembleRelease
[x] ./gradlew checkstyle
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
Description
The main purpose of PR is to solve the issue #987 - Crop feature similar to cam scanner. Code changes can be found in the ImageToPdfFragment class. My implementation steps are:
Fixes #987
Type of change
How Has This Been Tested?
./gradlew assembleDebug assembleRelease
./gradlew checkstyle
Checklist: