Use a BufferedImage and read an image file by ImageIO.read(file). Then you create a raster variable as a picture variable then get pixels from buffered image into that raster or you can directly get the rgb values from buffered image.
String name="C:\\JoclLwjgl\\rtest\\bubu.png"
static BufferedImage bi;
f=new File(name);
try {
bi=ImageIO.read(f);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
Raster pic=bi.getData(new Rectangle(0,0,bi.getWidth(),bi.getHeight()));
or
int zz=bi.getRGB(j, i);
(float)(zz>>16)&0xff) is "red" component as "float"