Clear a transparent BufferedImage as fast as possible
问题 I have a transparent BufferedImage created with the following code(not relevant how it is created, I think): GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gs = ge.getDefaultScreenDevice(); GraphicsConfiguration gc = gs.getDefaultConfiguration(); Rectangle screen = transformationContext.getScreen(); // Create an image that supports transparent pixels return gc.createCompatibleImage((int) screen.getWidth(), (int) screen.getHeight(), Transparency