By calling getRGB(int x, int y)
with a BufferedImage
object, one gets a single, negative number.
How can I convert three different values (a red, a green, and a blue) into this single, negative number?
Using the Color class:
new Color(r, g, b).getRGB()