Reputation: 561
I have drawn any picture, used Graphics 2D. How do I get the colour of a pixel at x, y? getPixelColor don't work, because this method get pixel from screen, not applet viewer coordinates.
Upvotes: 1
Views: 1119
Reputation: 168825
Graphics
of a BufferedImage
Graphics2D
.BufferedImage.getRGB(x,y)
or variants (check the docs.).Upvotes: 1