Can anyone help me with this?
I have a JPanel with a corresponding BufferedImage of the same size
(w,h)
I also have a two dimensional float array representing an image that
I've realised using a BufferedImage of a different (and larger) size
(w',h'), with a custom IndexColorModel and a DataBuffer of type float
(which constitutes the raster).
How do I blit the larger image to the JPanel buffer (which will be
viewed on the screen). Graphics/Graphics2D.drawImage seems to use only
the default colormodels. I seem to be missing something in terms of
how to use drawImage correctly, or perhaps there's another way to do
this.
Essentially, I wish to draw the float array to the JPanel buffer, so
that when I change the float values, the buffer gets updated
automatically and I see the results on the screen by invoking the
paint method of the JPanel (as a changing image). Any help would be
greatly appreciated!
Abhi
Knute Johnson - 24 Dec 2004 18:24 GMT
> Can anyone help me with this?
>
[quoted text clipped - 19 lines]
>
> Abhi
Take a look at MemoryImageSource, I think that will do exactly what you
describe.

Signature
Knute Johnson
email s/nospam/knute/