From 63c9cf4b94b4eebb5c0254eddd7fa2d4d302691b Mon Sep 17 00:00:00 2001 From: Fernando Alex Helwanger Date: Thu, 13 Sep 2018 16:35:56 -0300 Subject: [PATCH] [expo] Add missing PictureOptions props (#28860) --- types/expo/expo-tests.tsx | 24 ++++++++++++++++++++++++ types/expo/index.d.ts | 3 +++ 2 files changed, 27 insertions(+) diff --git a/types/expo/expo-tests.tsx b/types/expo/expo-tests.tsx index 0098a14489..ac1c6e3452 100644 --- a/types/expo/expo-tests.tsx +++ b/types/expo/expo-tests.tsx @@ -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(); diff --git a/types/expo/index.d.ts b/types/expo/index.d.ts index 868afd5e56..1376dea57c 100644 --- a/types/expo/index.d.ts +++ b/types/expo/index.d.ts @@ -769,6 +769,9 @@ export namespace Brightness { */ export interface PictureOptions { quality?: number; + base64?: boolean; + exif?: boolean; + onPictureSaved?: (data: PictureResponse) => void; } export interface PictureResponse {