Hello, I know this has been discussed a lot but I haven’t a definitive answer. Is this a good way/format (in terms of eventual rendering performance) to store images ?
URL url = classLoader.getResource(filename);
BufferedImage tempImage = ImageIO.read(url);
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsConfiguration gc = ge.getDefaultScreenDevice().getDefaultConfiguration();
BufferedImage compatibleImage = gc.createCompatibleImage(tempImage.getHeight(),tempImage.getWidth(),Transparency.TRANSLUCENT);
Graphics g = compatibleImage.getGraphics();
g.drawImage(tempImage,0,0,null);
g.dispose();
imageDictionary.put(imageId, compatibleImage);
Rendering the images from my imageDictionary doesn’t seem to be that quick. I am rendering to a BufferStrategy and flipping using J2D. I know an OGL binding will be faster but I’m a newb and would rather defer that decision till I know it’s necessary as I have enough to learn as it is!
thanks in advance,
Don.