I tried pixelgrabber to find the transparent pixel but i am not getting the position of the pixel from the image.This is my first question in stack overflow, so plz help me with this
Image image = new ImageIcon(IMAGE_PATH).getImage();
if (image instanceof BufferedImage) {
BufferedImage bimage = (BufferedImage) image;
System.out.println(bimage.getColorModel().hasAlpha());
}
PixelGrabber pg = new PixelGrabber(image, 0, 0, 100, 100, true);
try {
pg.grabPixels();
} catch (InterruptedException e) {
}
ColorModel cm = pg.getColorModel();
System.out.println(cm.hasAlpha ());
}
Comments
Post a Comment