This day i was watching this tutorial and he used this line...
private int[] pixels =((DataBufferInt)image.getRaster().getDataBuffer().getData());
But by some reason for him it works but for me it doesn't, i always get these two errors...
DataBufferInt
to int[]
getData()
is undefined for the type DataBuffer
Help me pls.
I had this often. Pay attention to the parentheses:
private int[] pixels =((DataBufferInt)image.getRaster().getDataBuffer()).getData();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.