[expo] Add missing PictureOptions props (#28860)

This commit is contained in:
Fernando Alex Helwanger
2018-09-13 16:35:56 -03:00
committed by Ryan Cavanaugh
parent 3c5bd3938d
commit 63c9cf4b94
2 changed files with 27 additions and 0 deletions

View File

@@ -287,6 +287,30 @@ Camera.Constants.BarCodeType;
}
}} />);
};
async (camera: CameraObject) => {
const picture = await camera.takePictureAsync({
quality: 0.5,
base64: true,
exif: true
});
picture.uri;
picture.width;
picture.height;
picture.exif;
picture.base64;
camera.takePictureAsync({
quality: 1,
onPictureSaved: pic => {
pic.uri;
pic.width;
pic.height;
pic.exif;
pic.base64;
}
});
};
async () => {
const result = await DocumentPicker.getDocumentAsync();

View File

@@ -769,6 +769,9 @@ export namespace Brightness {
*/
export interface PictureOptions {
quality?: number;
base64?: boolean;
exif?: boolean;
onPictureSaved?: (data: PictureResponse) => void;
}
export interface PictureResponse {