public WritableRaster createCompatibleWritableRaster(int w,int h){
  int[] bOffs={2,1,0};
  return Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE,w,h,w * 3,3,bOffs,null);
}

public WritableRaster createCompatibleWritableRaster ( int w , int h ) { int [ ] bOffs = { 2 , 1 , 0 } ; return Raster . createInterleavedRaster ( DataBuffer . TYPE_BYTE , w , h , w * 3 , 3 , bOffs , null ) ; }
creates a writableraster with the specified width and height , that has a data layout ( samplemodel ) compatible with this colormodel .
