expo: Editing images not working correctly with ImagePicker
🐛 Bug Report
When allowEditing is true, image cropping is not working correctly for Image Picker
Summary of Issue
For some photos, when cropping a photo, the resulting image is different that what the user selected. Instead of cropping at the user’s desired location, it only shows the bottom right corner of the image.
Environment - output of expo diagnostics & the platform(s) you’re targeting
Expo CLI 4.0.17 environment info: System: OS: macOS 11.1 Shell: 3.2.57 - /bin/bash Binaries: Node: 12.13.0 - /usr/local/bin/node Yarn: 1.19.1 - /usr/local/bin/yarn npm: 6.14.10 - /usr/local/bin/npm Managers: CocoaPods: 1.8.3 - /Users/jcalem/.rvm/rubies/ruby-2.6.3/bin/pod SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 IDEs: Android Studio: 3.5 AI-191.8026.42.35.6010548 Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild npmPackages: expo: ^40.0.0 => 40.0.0 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2 react-native-web: ~0.13.12 => 0.13.18 npmGlobalPackages: expo-cli: 4.0.17 Expo Workflow: managed
Reproducible Demo
https://snack.expo.io/@jcalem/a09c4d
Steps to Reproduce
On a physical devise, click the button and select and image. Zoom all the way in at a desired location and click “Choose”
NOTE: this issue only occurs for some images and not others (around 1 in 4 images)
Expected Behavior vs Actual Behavior
The returned photo does not match the user selected photo.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 21 (8 by maintainers)
@thebuddysystem Since the expo image editor by coldwell doesn’t fit my design approach and has limitations in changing the ui, i ended up coding my own image editor with expo image picker and expo image manipulator. It was an interesting task and i really recommend you guys going on the same journey! If you need help, feel free to contact me.
I might be going to share my approach via GitHub soon, but i have to figure out how to do it professionally.
@sanborN93 https://github.com/thomas-coldwell/expo-image-editor
i don’t think it is related @rSkogeby - this issue is about ios, where there are well documented bugs with the underlying ios api from apple 😃
I am willing to contribute $$ if someone can find a solution to this. Unfortunately, I am not well versed in native iOS languages.