Canvas to paint pixels on

What is the best (fastest) way these days to paint pixels on a canvas?

And is it possible to get a decent framerate and some time for the rest of the game (and to calculate the pixels) at fullscreen (800x600 or even 1000x800)?

I did some stuff with MemoryImageSource years ago, and there should be a better way to stuff like this now.

I know I could google this up. But results on google about stuff like this, show you how to do, it written by someone who has toyed around a bit, but seldom show you the way it is used by ‘real’ programmers.

:edit: If per-pixel rendering is what you are asking for…

You have 2 ‘optimal’ ways of doing it,

ImageProducer and BufferedImage/DataBufferInt.

Both are slightly faster than MemoryImageSource.

BufferedImage/DataBufferInt, is slightly faster than ImageProducer but forces you to have a static ColorModel.

http://forum.java.sun.com/thread.jsp?forum=406&thread=375345

Depends on what you mean…

The FASTEST way to get pixels to screen is BLTing with the data in video memory. (VolatileImage or “Managed Images” – what we used to call “Automatic Images.”)