Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(document-scanner): add quality and base64 #3168

Merged
merged 2 commits into from
Sep 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/@ionic-native/plugins/document-scanner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@ export interface DocumentScannerOptions {
* which is "image".
*/
fileName?: string;

/**
* Quality to use when capturing the image, must be a float value
* from 1.0(default - Highest quality) to 5.0(Lowest Quality). Any value
* in between will be accepted. Any value not equal to or not between these values
* will default to the highest quality of 1.0.
*/
quality?: number;

/**
* If the image should be returned as a base64 encoding instead of as a file URL.
* If true, the plugin will return the scanned image as base64. If false,
* the plugin will return the image URL of the image.
*/
returnBase64?: boolean;
}

/**
Expand Down