image - Java printing ArrayList of points -
how go printing arraylist full of points generated imageio.read method? doesn't seem work me :(
for(int = 0; < list.size(); i++) { system.out.println(deeptostring(list.get(i))); }
imageio.read()
returns bufferedimage
. did list<point>
? assuming getting list<point>
where, following should work.
list<point> list = ...; (point p : list) system.out.println(p);
if objective print colors in given image x, y, use following code...
bufferedimage im = imageio.read(....); int width = im.getwidth(); int height = im.getheight(); (int x = 0; x < width; x++) { (int y = 0; y < height; y++) system.out.println("x = " + x + ", y = " + y + ", color = " + im.getrgb(x, y)); }
if none of these satisfy need, pls explain need correctly...
Comments
Post a Comment