我在这里搜索了一下以找到答案,但我找到的答案并没有帮助我,所以我创建了一个新的帖子..
错误在于:
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
任何帮助?
答案 0 :(得分:4)
请导入DataBufferInt
:
import java.awt.image.DataBufferInt;