本帖最后由 dddfffxxx 于 2013-05-27 17:05:03 编辑

解决方案 »

  1.   

    好吧,我自己搞定了,虽然不是很了解BufferedImage构造函数的第三个参数的区别
    修改代码int type=image.getType();
            filterImage=new BufferedImage(w, h, type);
    就可以了
      

  2.   

    要创建相同的颜色表,ColorModel然后设置像素
    具体代码如下:
                dstCM = src.getColorModel();
            return new BufferedImage(dstCM, dstCM.createCompatibleWritableRaster(src.getWidth(), src.getHeight()), dstCM.isAlphaPremultiplied(), null);
      

  3.   

    BufferedImage.TYPE_XXX或者颜色空间不对?