int[] readJPEG(InputStream in) throws IOException { BufferedImage bi = ImageIO.read(in); ImageProcessor ip = new ColorProcessor(bi); return (int[]) ip.getPixels(); }