Hi all. I'm having a problem to represent or use a variable as an int.
Color c = new Color(255, 0, 0);
int y = c.getRGB();
for (int v = 0; v < h; v++) {
for (int u = 0; u < w; u++) {
int x = image.get(u, v);
if (x == 255) {
image.set(u, v, y);
}
}
}
My variable c actually contains the values for a RGB colour. I want to use it as an int so I can set it to the colour I want.