im drawing a bunch of tiles on a Canvas
, these tiles are represented by either Image
s or BufferedImage
s.
i noticed that im getting millisecond draws with Image
s but what i start using BufferedImage
s for the tiles the frame time sky rockets to above 20ms.
BufferedImage buffered = ImageIO.read(new File(fileName));
Image image = Toolkit.getDefaultToolkit().createImage(fileName);
Both of these images support alpha channels. I would like to start using alpha capable Image
's for intermediary buffers. However i havent found a place in the jdk that can generate them besides this Toolkit call to create one from a file.
Basically does anyone know how to create a blank Image (not BufferedImage) from scratch that can support alpha?