I have an image I just need to check the transparent image , How can I do that ?
Printable View
I have an image I just need to check the transparent image , How can I do that ?
Please try this
Code:if ( (mouseX >= imageX) && (mouseX < imageX+image.getWidth(this)) && (mouseY >= imageY) && (mouseY < imageY+image.getHeight(this)) )
{
int alpha = (image.getRGB(mouseX-imageX, mouseY-imageY) >> 24) & 0xff;
if (alpha == 0) { result = false; }
else {result = true; }
}