压缩图片:代码如下
File f=new File("D:\\upload\\image\\201807010\\sssssss.jpg");
String c="D:\\upload\\file\\1531185946(1).jp
Images.clipScale(new File(c), f, 230, 220);
报错如下:
java.lang.IllegalArgumentException: Numbers of source Raster bands and source color space components do not match
at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:482)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1280)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native Method)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1247)
at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1050)
at javax.imageio.ImageIO.read(ImageIO.java:1448)
at javax.imageio.ImageIO.read(ImageIO.java:1308)
at org.nutz.img.Images.read(Images.java:965)
at org.nutz.img.Images.clipScale(Images.java:351)
问答
Numbers of source Raster bands and source color space components do not match
标签:
无
4 回复
添加回复
请先登陆