Support different output formats on iOS #82
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all thank you for this great plugin, it does an amazing job.
Based on some feedback from our customers, we discovered that in many cases the scans made on iOS devices resulted in far bigger image files when comparing to scanning the same documents on an Android device.
Digging through the code base I quickly realized that this is caused be the different image formats used on the different platforms. On Android all scans are save using the JPEG format, while on iOS scans are saved using the PNG format. Comparing a simple A4 document resulted in a 7.5 MB file on on iOS, while on Android the same scan was only 450 KB in file size.
This PR adds support to supply an instance of the
IosScannerOptions
to thegetPictures
method which allows users to specify which format should be used to save scans on iOS. The parameter is optional and if not specified the plugin behaves exactly as the current version.Example usage: