Read a pixel color from image

There are any way to get a pixel color from an image (in format PNG, JPG ou even a Base64) without eject Expo?

Since Apple start the deprecation warning ITMS-90809, I dont want to use the workaround of use canvas inside a Webview.

Any ideias?

SDK Version: 34
Platforms: Both

I doubt there’s a way to do it without ejecting… unless you move the logic server-side- upload your image to an API and then you can do whatever analysis on it you want on your server using ImageMagick or whatever you need.

That said, you don’t have to avoid the HTML Canvas workaround on account of ITMS-90809. Apple isn’t prohibiting all Web Views, just the old, old UIWebView class. react-native-webview has been using WKWebView for a while now.

1 Like

Thanks a lot for your reply @llamaluvr. It definitely makes me reconsider some actions. cheers.

1 Like

whoops, I missed this related thread useWebKit=true doesn't appear to use WKWebView - #2 by salus. Apparently those check-ins on react-native-webview using WKWebView are newer than I thought, and not into Expo yet. Anyway, if you want to use the Canvas method, hang tight, and those warnings should go away soon. If they actually banned all web views, so many of us would be royally screwed! :slight_smile:

Ok, thanks for advise.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.