把图片装成bufferedimage类对象,调用getRGB(int x,int y)方法调出x,y坐标上的RGB值,用set(int x,int y,int RGB)向坐标x,y写入值为RGB的颜色.