diff --git a/Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json index b8236c6..19882d5 100644 --- a/Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json @@ -39,6 +39,11 @@ "idiom" : "iphone", "size" : "60x60", "scale" : "3x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/android/src/main/java/com/lwansbrough/RCTCamera/MutableImage.java b/android/src/main/java/com/lwansbrough/RCTCamera/MutableImage.java index ed2f6f0..74a3515 100644 --- a/android/src/main/java/com/lwansbrough/RCTCamera/MutableImage.java +++ b/android/src/main/java/com/lwansbrough/RCTCamera/MutableImage.java @@ -76,7 +76,7 @@ public class MutableImage { } } - public void cropToPreview(int orientation, float xPercentage, float yPercentage) throws ImageMutationFailedException { + public void cropToPreview(int orientation, float xPercentage, float yPercentage) throws IllegalArgumentException { int width = this.currentRepresentation.getWidth(); int height = this.currentRepresentation.getHeight(); diff --git a/android/src/main/java/com/lwansbrough/RCTCamera/RCTCameraModule.java b/android/src/main/java/com/lwansbrough/RCTCamera/RCTCameraModule.java index ce6d1cc..d58fe1d 100644 --- a/android/src/main/java/com/lwansbrough/RCTCamera/RCTCameraModule.java +++ b/android/src/main/java/com/lwansbrough/RCTCamera/RCTCameraModule.java @@ -589,7 +589,7 @@ public class RCTCameraModule extends ReactContextBaseJavaModule int orientation = _reactContext.getResources().getConfiguration().orientation; mutableImage.cropToPreview(orientation, paddingWidth, paddingHeight); - } catch (MutableImage.ImageMutationFailedException e) { + } catch (IllegalArgumentException e) { promise.reject("Error cropping image to preview", e); } }