From a0887c6d9dafa1ad1e7939736b4c0016c1e65cf8 Mon Sep 17 00:00:00 2001 From: Gleidson Daniel Date: Tue, 20 Sep 2022 20:08:09 -0300 Subject: [PATCH] set quality and remove editing --- app/lib/methods/mediaPicker.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/lib/methods/mediaPicker.ts b/app/lib/methods/mediaPicker.ts index d9ffee685..7efdcfa5a 100644 --- a/app/lib/methods/mediaPicker.ts +++ b/app/lib/methods/mediaPicker.ts @@ -58,7 +58,7 @@ const pickFromCamera = async ( if (!hasPermission) return null; const image = await ImagePicker.launchCameraAsync({ mediaTypes: mediaType, - quality: 1, + quality: 0.8, allowsEditing }); if (!image.cancelled) return addAdditionalPropsToFile(image); @@ -97,7 +97,7 @@ export async function pickImageFromLibrary({ animatedGif = true }: { animatedGif try { const image = await ImagePicker.launchImageLibraryAsync({ mediaTypes: ImagePicker.MediaTypeOptions.Images, - quality: animatedGif ? 1 : 0.9, + quality: animatedGif ? 1 : 0.8, base64: true }); if (!image.cancelled) { @@ -111,8 +111,8 @@ export async function pickImageFromLibrary({ animatedGif = true }: { animatedGif } } -export const pickVideoFromCamera = (allowsEditing = true): Promise => +export const pickVideoFromCamera = (allowsEditing = false): Promise => pickFromCamera(allowsEditing, ImagePicker.MediaTypeOptions.Videos); -export const pickImageFromCamera = (allowsEditing = true): Promise => +export const pickImageFromCamera = (allowsEditing = false): Promise => pickFromCamera(allowsEditing, ImagePicker.MediaTypeOptions.Images);