Reprise du message précédent :
bon,
private static final Color transparentBG = new Color(255, 255, 255, 0);
// ... BufferedImage img = new BufferedImage(SIZE_X, SIZE_Y, BufferedImage.TYPE_INT_ARGB);
Graphics2D graphics = (Graphics2D) img.getGraphics();
graphics.setColor(transparentBG);
|
j'essaiyais de me battre avec un IndexedColorModel, mais on dirait que ça veut pas.
Donc le truc à retenir ici, c'est le background explicitement transparent(alpha à 0 pour transparentBG), et le TYPE_INT_ARGB ![[:spamafote] [:spamafote]](https://forum-images.hardware.fr/images/perso/spamafote.gif)
Message édité par the real moins moins le 31-01-2005 à 20:43:28
---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?