目的是装载图片,运行时抛出异常:
java.awt.image.RasterFormatException:( y + height ) is out of Raster代码如下:
public BufferedImage loadImage(){
BufferedImage image = null;
try{
image = ImageIO.read(new File("d:/aa/aaa.jpg"));
} catch ( Exception e ){
System.out.println("装载图像错误!");
}
return image;
}请大虾帮忙
java.awt.image.RasterFormatException:( y + height ) is out of Raster代码如下:
public BufferedImage loadImage(){
BufferedImage image = null;
try{
image = ImageIO.read(new File("d:/aa/aaa.jpg"));
} catch ( Exception e ){
System.out.println("装载图像错误!");
}
return image;
}请大虾帮忙
这个你都能编译通过? 不用转换吗?
把错误贴出来
这个你都能编译通过? 不用转换吗?
把错误贴出来
这个你都能编译通过 ? 不用转换
你把错误贴出来
=》确实能编译通过
你把错误贴出来
=》运行时异常:java.awt.image.RasterFormatException:( y + height ) is out of Raster
别弄Exception异常
=》纯新手,不知道该用哪个异常:(
要么文件不存在
=》证实文件存在,下面的代码打印结果:true
File file = new File("d:/aa/aaa.jpg");
System.out.println(file.exists());
要么该图片的色彩空间是adobe rgb的
=》图片我是用Windows画板随便画的,色彩空间不清楚
=》确实能编译通过
你把错误贴出来
=》运行时异常:java.awt.image.RasterFormatException:( y + height ) is out of Raster
别弄Exception异常
=》纯新手,不知道该用哪个异常:(
要么文件不存在
=》证实文件存在,下面的代码打印结果:true
File file = new File("d:/aa/aaa.jpg");
System.out.println(file.exists());
要么该图片的色彩空间是adobe rgb的
=》图片我是用Windows画板随便画的,色彩空间不清楚
=》确实能编译通过
你把错误贴出来
=》运行时异常:java.awt.image.RasterFormatException:( y + height ) is out of Raster
别弄Exception异常
=》纯新手,不知道该用哪个异常:(
要么文件不存在
=》证实文件存在,下面的代码打印结果:true
File file = new File("d:/aa/aaa.jpg");
System.out.println(file.exists());
要么该图片的色彩空间是adobe rgb的
=》图片我是用Windows画板随便画的,色彩空间不清楚
=》确实能编译通过
你把错误贴出来
=》运行时异常:java.awt.image.RasterFormatException:( y + height ) is out of Raster
别弄Exception异常
=》纯新手,不知道该用哪个异常:(
要么文件不存在
=》证实文件存在,下面的代码打印结果:true
File file = new File("d:/aa/aaa.jpg");
System.out.println(file.exists());
要么该图片的色彩空间是adobe rgb的
=》图片我是用Windows画板随便画的,色彩空间不清楚