I'm using Component.createImage(int, int) to create accelerated images, and this is working well for creating opaque images, but it does not work for transparent images. I don't believe that fully transparent images can be accelerated with Java yet (let me know if i'm wrong) but i have read that 1-bit transparency images can be accelerated. Is this the case, and if so how is it done? Right now I have the following createAcceleratedImage that i'm trying to use:
public static Image createAcceleratedImage(Image image) { if (image instanceof AcceleratedOffScreenImage) return image; // this works but the accelerate images are always opaque, so comment it out. // Image result = myComponent.createImage(image.getWidth(null), image.getHeight(null)); // This makes images will transparency, but they seem the same speed as normal buffered images with transparent regions. GraphicsConfiguration graphicsConfiguration = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDe faultConfiguration(); BufferedImage result = (BufferedImage)graphicsConfiguration.createCompatibleImage(image.getWidth(null), image.getHeight(null), Transparency.BITMASK); Graphics2D g2 = (Graphics2D) result.getGraphics(); g2.setColor(new Color(0, 0, 0, 0)); g2.setPaintMode(); g2.fillRect(0, 0, image.getWidth(null), image.getWidth(null)); g2 = (Graphics2D) result.getGraphics(); g2.drawImage(image, 0, 0, null); return result; } But the images (when using the Transparency.BITMASK) code do not seem accelerated. So is it possible to get accelerated images with a BITMASK? Thanks, Jesse =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".