public BufferedImage createCompatibleImage(int width,int height){
  WritableRaster wr=raster.createCompatibleWritableRaster(width,height);
  return new BufferedImage(model,wr,model.isAlphaPremultiplied(),null);
}

public BufferedImage createCompatibleImage ( int width , int height ) { WritableRaster wr = raster . createCompatibleWritableRaster ( width , height ) ; return new BufferedImage ( model , wr , model . isAlphaPremultiplied ( ) , null ) ; }
returns a bufferedimage with channel layout and color model compatible with this graphics configuration . this method has nothing to do with memory - mapping a device . this bufferedimage has a layout and color model that is closest to this native device configuration and thus can be optimally blitted to this device .
