Keeping a cache of images

I’m designing and programming my own (very) simple graphics engine for a small game I’m making. Although it is small and simple, I still want it to be hardware accelerated. I read the tutorial and cokeandcode. He caches the images as Image objects in a hashmap. It is my understanding that Image objects are not accelerated. Would it be better keep these stored as BufferedImages? ImageIO can create them directly without any of the copying of older versions of Java. It seems like there would be minimal overhead. Am I just missing something? It doesn’t make sense to be me that the tutorial would use Image objects for storage when the tutorial boasts hardware acceleration.

I’m going to push onward with other parts of the game.

Thanks in advance,
-Cluesless Newbie

BufferedImages are subclasses of Images so can be stored in the cache quite happily. More to the point to get accelerated images in 1.4 you needed to call createCompatibleImage() which returned you type “Image” which allows the underlying acceleration provider to give you back their own image type to (which fitted their implementation).

Kev

Thank you. Your post was most helpful.

-Kris