Reputation: 19
i have 426px * 436px
but when i use byte[] pixels = ((DataBufferByte) image.getRaster().getDataBuffer()).getData();
then i use system.out.printl(pixels.length) result is 557208 it is 3x 426x436 can someone explain it
Upvotes: 0
Views: 57
Reputation: 517
Each pixel requires 3 bytes, 1 for red, 1 for green, 1 for blue (assuming the image is using that color format, I would expect it to be that unless you changed the format).
Upvotes: 1