Color getAlpha() not working as intended
- by Arvy
I was making a program where I load an image and after that I do something with opaque pixels. Transparent pixels showed up as black pixels, but after some time I found the cause:
Color c = new Color (input.getRGB(x, y));
Works-> if ((input.getRGB(x, y) & 0xFF000000) != 0x00000000) { do_smth();}
Returns true at all times-> if (c.getAlpha() != 0) { do_smth(); }
So why it does not work?