Réponse acceptée !
Salut,
et si le pixel a de la transparence :
public static Color getPixelColor(BufferedImage bi, int x, int y) throws OutOfMemoryError{ if(bi == null) return null; int c = bi.getRGB(x,y); int red = (c & 0x00FF0000) >> 16; int green = (c & 0x0000FF00) >> 8; int blue = c & 0x000000FF; int alpha = c & 0xFF000000; return new Color(red, blue, green, alpha); }
------------------------------------ "On n'est pas au resto : ici on ne fait pas dans les plats tout cuits ..."
WORA
|