http://www.oschina.net/code/snippet_20814_4162
if(cols-index2==1){
width=col_yu==0?widths:col_yu;
}
// imf=new CropImageFilter(x, y, width, height);
// img=Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(image.getSource(), imf));
//
// bimg=new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
// Graphics gi=bimg.getGraphics();
// gi.drawImage(img,0,0,null);
// gi.dispose();
bimg = bi.getSubimage(x, y, width, height);
转载于:https://my.oschina.net/dubenju/blog/156259