Closed sperko00 closed 4 years ago
@sperko00 This error appears when you set values for width or height less than or equals to zero
const uriPath = await ImageEditor.cropImage(originUri, {
size: {
width: file.node.image.width,
height: file.node.image.height,
},
offset: {
x: 0,
y: 0,
},
});
I sometimes get an error message like this in my code. "message":"{\"code\":\"101\",\"message\":\"Error Domain=org.reactnativecommunity.imageeditor.writeToFileError Code=101 \\"(null)\\"\",\"domain\":\"org.reactnativecommunity.imageeditor.writeToFileError . Is there a problem with the code ? The file object is the information coming from the image file accessed by @react-native-camera-roll/camera-roll.
@weymanator
Bug
Bug is only happening on ios platform. When calling cropImage method it gives this error (not always):
Environment info
React native info output:
System: OS: macOS 10.15.1 CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz Memory: 18.79 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.16.3 - /usr/local/bin/node Yarn: 1.19.1 - /usr/local/bin/yarn npm: 6.9.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 Android SDK: API Levels: 25, 28, 29 Build Tools: 28.0.3, 29.0.2 System Images: android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom IDEs: Android Studio: 3.5 AI-191.8026.42.35.5977832 Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.3 => 0.60.3 npmGlobalPackages: react-native-cli: 2.0.1
Library version: 2.2.0
Steps To Reproduce
Try to crop image on ios