* Returns a vector of the data in the given image.
*/
private static GVector getData(Image image, int x, int y, int width, int height) {
int[] pixels = new int[width * height];
PixelGrabber pg = new PixelGrabber(image, x, y, width, height, pixels, 0, width);
try { pg.grabPixels(); }
catch(InterruptedException e) { throw new RuntimeException(e); }
GVector data = new GVector(3 * pixels.length);
for(int i = 0; i < pixels.length; i++) {
int red = (pixels[i] >> 16) & 0xff;