Getting expo-gl createCameraTextureAsync texture dimensions

Please provide the following:

  1. SDK Version: 7.0.0
  2. Platforms(Android/iOS/web/all): Android & iOS

Hi, thanks for all the great work on expo and expo-gl!

I’m working on an integration between tensorflow.js and react-native and recently have been working to enable near real time streaming from the camera into tensorflow models. I’ve been using createCameraTextureAsync as a source for camera data, but one remaining issue I’m noticing is that there isn’t a way to get the true pixel dimensions (width and height) of the texture.

I’ve been able to determine it empirically on the devices I’m testing on, but for end users of the library it would be great if there were a programmatic way to get this.

I know that opengl/webgl does not provide a way to query a texture, but in digging around in the source I was wondering if the dimensions when allocating the texture storage in something like GLCameraObject could be exposed in the SDK (the transformation matrix might also be useful, but the dimensions would be immediately quite helpful).

Thanks and let me know if there is another way to approach this that I might have missed.

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