You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue 328 ios fix image loading using uri or path (#381)
* feat(example): load image using react-native-vision-camera
* fix(ios): fix image loading
Use RCTConvert & RCTUmageLoader in order to load images correctly with path and uri
* feat(example): load image from url
* feat(example): load image using react-native-camera-roll
* fix(example): display image correctly on android
* docs: specify with which library uri parameter has been tested
Copy file name to clipboardExpand all lines: README.md
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,12 @@ A basic, sample app is available in [the `example` folder](https://github.com/ba
64
64
65
65
```javascript
66
66
createResizedImage(
67
-
path,
67
+
/**
68
+
* uri parameter accepts`path` or `uri`.
69
+
* This property has been tested with the output of @bam.tech/react-native-image-picker,
70
+
* react-native-vision-camera, @react-native-camera-roll/camera-roll and http link
71
+
**/
72
+
uri,
68
73
maxWidth,
69
74
maxHeight,
70
75
compressFormat,
@@ -91,6 +96,10 @@ The promise resolves with an object containing: `path`, `uri`, `name`, `size` (b
91
96
| options.mode | Similar to [react-native Image's resizeMode](https://reactnative.dev/docs/image#resizemode): either `contain` (the default), `cover`, or `stretch`. `contain` will fit the image within `width` and `height`, preserving its ratio. `cover` preserves the aspect ratio, and makes sure the image is at least `width` wide or `height` tall. `stretch` will resize the image to exactly `width` and `height`. |
92
97
| options.onlyScaleDown | If `true`, will never enlarge the image, and will only make it smaller. |
93
98
99
+
# Limitations
100
+
101
+
- If you are using `@react-native-camera-roll/camera-roll`**with new architecture enabled this library is not going to work**. If you try to display an image with the `uri` of the library using `<Image />` you are going to have the following error: `No suitable image URL loader found for ph://...`. This error come from the ReactNative `ImageLoader`, which is the one we are currently using. Help/PR for solving this are welcome. Until then, we recommend using `react-native-image-picker`.
102
+
94
103
## 👉 About Bam
95
104
96
105
We are a 100 people company developing and designing multiplatform applications with [React Native](https://www.bam.tech/agence-react-native-paris) using the Lean & Agile methodology. To get more information on the solutions that would suit your needs, feel free to get in touch by [email](mailto://[email protected]) or through or [contact form](https://www.bam.tech/en/contact)!
0 commit comments