I am having a discussion with the developer of the Pro Camera extension on a different form. The form moderator suggested I bring the conversation to this form. Here's a summary…
--- Me ---
Thanks for a great extension.
I would like to do a CCTV type app that sends low-quality video from one phone to another via my local LAN. I did an app like this years ago, but it uses the original camera library which is no longer supported on my Android 11 devices.
Is there a way to get a bitmap or JPEG preview image from the frame (vertical layout) into a byte array variable that can be sent over the network to another device?
--- Pro camera extension developer ---
Yes, this is possible to be done. You can use any extension (other) which will return the byte values in a list that you can send over networks. But it may lag a bit because the list size will be too high.
--- Me ---
I’m not super knowledgeable in using App Inventor. Do you know what code (blocks) would be used in order to read the byte data from the frame (vertical arrangement)?
I agree it would lag terribly if I used the full-sized preview image from the camera. What I did previously was I was able to reduce the preview image size to, for example, 640x480. This was using the original camera library. From what I can tell the camera2 library will use the frame size to reduce the size of the preview image – so if I set the vertical arrangement frame size to 640x480 hopefully it will reduce the preview image size (this is all just a guess).>
- In App Inventor how would I get the preview image data from the vertical arrangement?
- Will changing the dimensions of the vertical frame change the size of the preview image?
Any help is greatly appreciated.
Thanks,
Barry.