I'm trying to use this code from Daniel Shiffman, translating the necessary parts to Android's graphics library (since Android doesn't include awt libraries).
http://shiffman.net/2010/11/13/streaming-video-with-udp-in-processing/ I'm basically trying to stream video from an Android tablet to a Processing sketch running on a PC, both connected to the same WiFi network. Like using the tablet as a wireless webcam. NOTE: I'm using a still to test this out but I'll use the tablet's camera, that's why I can't use "file to byte array" methods.
I have to convert a PImage to a byte array that is usable with Android's BitmapFactory.decodeByteArray() . How do I do that?
I tried looping through the pixels[] and passing it to an int array but, when I translate this to bytes, the BitmapFactory can't use it.