0

How do I find the pixel color of a given point inside a JPanel with a moving image? Can I do this using BufferedImage or Graphics?

1 Answers1

0

You would take whatever frame you are trying to get the pixel color from and then turn it into a BufferedImage and then use .getRGB(x,y) which will return an integer pixel. Turn that into a Color Object and then use getRed() getBlue() getGreen() getAlpha() for the values.

Dani
  • 1,220
  • 7
  • 22