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?
Asked
Active
Viewed 141 times
1 Answers
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
-
How do you find multiple frames on a JPanel since my Image is moving? – Joe The Pig Apr 06 '17 at 16:30