DataBufferInt无法解析为变量[err]

时间:2013-05-29 10:16:55

标签: java int

我在这里搜索了一下以找到答案,但我找到的答案并没有帮助我,所以我创建了一个新的帖子..

错误在于:

private BufferedImage image = new BufferedImage(WIDTH, HEIGHT,BufferedImage.TYPE_INT_RGB);

private int[] pixels =((DataBufferInt)image.getRaster().getDataBuffer()).getData();

//错误

DataBufferInt cannot be resolved to a variable

任何帮助?

1 个答案:

答案 0 :(得分:4)

请导入DataBufferInt

 import java.awt.image.DataBufferInt;