i have this code snippet:
in which the array pixelValues will have the RGB data of each pixel in the image. the problem is that my application slows down at createImage(), considering that this snippet loops. i don't really need to display the image.
byte snap = videoControl.getSnapshot("encoding=png");
Image img = Image.createImage(snap, 0, snap.length);
int pixelValues = new int[img.getWidth * img.getHeight);
i know that snap contains the data of the image encoded in png format.
my question is, is there a way to obtain the RGB pixel values straight from snap without using createImage()? code would be very much appreciated.