What lines of code turn a regular image
image = Toolkit.getDefaultToolkit().getImage("image.png");
Into an "automatic" image?
You should use toolkit.createImage(), rather than toolkit.getImage().
There are several ways you can obtain automatic images.
1) Images obtained from toolkit.createImage() are eligable for hardware acceleration.
2) If you need an image that is eligable for hardware acceleration, and can also be modified, you should use :-
graphicsConfiguration.createCompatibleImage(width,height[,Transparency.BITMASK]).
Images obtained from this method will be eligable for acceleration so long as you never obtain a direct reference to the raster (getRaster()/getAlphaRaster()/etc).
Also, images will only be accelerated if they are opaque, or have a bitmask transparency(Transparency.OPAQUE and Transparency.BITMASK) - full translucency is not supported at this time.