2 tianxi0914 tianxi0914 于 2014.03.20 15:22 提问

求助大神,解决WritableRaster 的读入问题

public static void main(String[] args) {
BufferedImage oImage = ImageUtil.getImage("D://1.jpg");
WritableRaster oRaster = oImage.getRaster();
int oHeight = oRaster.getHeight();
int oWidth = oRaster.getWidth();
int[] oPixels = new int[oWidth * oHeight];
oRaster.getPixels(0, 0, oWidth, oHeight, oPixels);
}
出现;Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
异常,求大神解决

Csdn user default icon
上传中...
上传图片
插入图片