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


#1

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


#2

hi, can I ask your use case?


#3

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


#4

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


#5

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


#6

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


#7

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