From e11ed2fb524b6987723d848101ef6bd642e7c8dc Mon Sep 17 00:00:00 2001 From: Petter Solberg Date: Wed, 8 Nov 2017 17:15:48 +0100 Subject: [PATCH] Fixed hardcoded jpegQuality on android when saving to temp and disk --- .../main/java/com/lwansbrough/RCTCamera/RCTCameraModule.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/lwansbrough/RCTCamera/RCTCameraModule.java b/android/src/main/java/com/lwansbrough/RCTCamera/RCTCameraModule.java index 9247b6b98..13b797a91 100644 --- a/android/src/main/java/com/lwansbrough/RCTCamera/RCTCameraModule.java +++ b/android/src/main/java/com/lwansbrough/RCTCamera/RCTCameraModule.java @@ -618,7 +618,7 @@ private synchronized void processImage(MutableImage mutableImage, ReadableMap op } try { - mutableImage.writeDataToFile(pictureFile, options, 85); + mutableImage.writeDataToFile(pictureFile, options, jpegQualityPercent); } catch (IOException e) { promise.reject("failed to save image file", e); return; @@ -636,7 +636,7 @@ private synchronized void processImage(MutableImage mutableImage, ReadableMap op } try { - mutableImage.writeDataToFile(tempFile, options, 85); + mutableImage.writeDataToFile(tempFile, options, jpegQualityPercent); } catch (IOException e) { promise.reject("failed to save image file", e); return;