itinance / itinance/react-native-fs
Reading an image file and returning Uint8Array or Uint8ClampedArray
Open
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I am using _react-native-fs_ to read images that I retrieve with the ImagePicker of React Native.
I want to convert these images into Uint8Array (or Uint8ClampedArray even better), and for now I do it like this:
```
RNFS.readFile(result.uri, "base64").then(data => {
base64res = base64.parse(data); // -> Uint8Array
});
```
But, I want have a very fast code, so, is there a function like `readFile `or an option of `readFile` that **directly** return _Uint8Array_ ?
Thank you
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.