> Is it
> really faster then the MemoryImageSource approach?
Yes.

> Can you try to modify my example code using your
> suggestion, so that we can see if it produces
> similiar memory leaking behavior or if it solves it?
Sorry, no ... I don't have the time.

I post a snippit which should be easy to use:
[code]
image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
                int[] buffer = ((DataBufferInt) img.getRaster().getDataBuffer())
                                .getData();
[/code]

buffer is now width*height in lenght. so width-1 is the first element of the 
second line.


> In the original application, switching from
> BufferedImage to MIS reduced frame rendering time
> from 45ms to 5ms (not taking into account the extra
> memory consumption). But then of course, I was not
> using the raster but setRGB().
If you don't render this image many times without chnging its data, I am sure 
it will be faster.
If you change it every frame, I guarantee its at least equally fast ;)

lg Clemens
[Message sent by forum member 'linuxhippy' (linuxhippy)]

http://forums.java.net/jive/thread.jspa?messageID=269318

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to