Hello I need to know a pixel is transparent or not.
I convert a color of an image to transparent with this function :
1 2 3 4 5
| BufferedImage image; int x, y;
int col = image.getRGB(x, y); image.setRGB(x, y, col & 0x00ffffff); |
The color of the image in coordinate x, y is converted to transparent.
Now i need to check whether the color is transparent or not :
1 2 3 4 5 6 7 8 9 10
| BufferedImage image; int x, y;
int col = image.getRGB(x, y);
if (col == ????) { System.out.println("transparent color"); } else { System.out.println("opaque color"); } |
Anyone know about this?
What I'm confuse is the transparent color of a new created blank image (GraphicsConfiguration.createCompatibleImage(width, height, Transparency.BITMASK)) is 0, but when I use above code to convert a color to transparent, the transparent color is not 0?

Thanks