Is there a way to get pixels RGBA array from an image?

in GLview or if there is a way to use HTML canvas?

hi, can I ask your use case?

Hi edgar, I have made an application using Ionic framework months ago, here is a link : https://itunes.apple.com/us/app/id1313435139

but now I am planning to make it in react native for better performance! I was using html5 canvas to get image pixels colors and then draw Emojis on every 16 pixels. I have no idea on how to implement this in react native, I tried expo-processing but it isn’t implemented to include images.

Do you have any ideas on how to do this ?
Thanks

Interesting! Perhaps the fastest way to get this working for you (to keep the canvas code the same) is to funnel it through https://facebook.github.io/react-native/docs/webview.html

I tried Webview, but the problem is there is no way to transfer data between component and Webview.
Also, I’ve turned to react native for performance

Well as a first step (just a suggestion), just to get everything working I would try getting things working via web view,

Thanks to @bacon for his help https://snack.expo.io/@bacon/get-image-data-rgba-expo-+-exgl

1 Like