BufferedImage image = null;
image = ImageIO.read(ne w File("D:\testim age.jpg"));

width=640;
height=480;
int[] rgbdata = new int[width*height];
image.getRGB(0, 0,width,height, rgbdata,0,width );

bytes = new byte[rgbdata.length];
pixelValues = new double[rgbdata.length];

for ( int i = 0; i < bytes.length; i++) {
bytes[i] = (byte) (r...