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.
Graphics
of a BufferedImage
Graphics2D
. BufferedImage.getRGB(x,y)
or variants (check the docs.).
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.