File file=new File(ImageFilePaht);//图片路径
BufferedImage bufIma=ImageIO.read(file);//
int width=bufIma.getWidth();
int height=bufIma.getHeight();
int imaRGB[][]=new int[widht][height];//存放RGB信息数组,重点

//从bufIma读取RGB到数组中
for(int i=0;i<widht;i++)
    for(int j=0;j<height;j++)
         imaRGB[i][j]=BufIma.getRGB(i,j)&0xFFFFF;//不太懂


补充:BufferedImage.getRGB(width,height)&0xFFFFF;==>>返回值为   默认 RGB 颜色模型和默认 sRGB 颜色空间中的整数像素