I have a video stream coming into processing and I need to be able to read the colors of all the pixels in the stream. I have tried reading it as both a PImage and PGraphic, but the normal methods of loadPixels(), or even get() don’t seem to work, It only reads back 0’s. I was looking through the source and it does seem to use a Texture variable, but I still can’t manage to read the colors.
It displays fine, but I need to be able to scan/read the pixel array.
This is perfect. Thanks for your help. I was writing it into a normal PGraphic instead of PGraphicOPENGL, so I couldn’t get the data out. You might consider adding this as an example for the processing library in the next release. I’m pretty familiar with processing and couldn’t get this to work and it is extremely useful.
The code additions really belong in the library but could be in an example as you say. The library is due for an update soon, so I will look into options.