> The memory-leaking behavior is not relevant for me
> anymore since I changed the implementation to
> MemoryImageSource already, but I am still curious if
> anyone has an idea why setting pixels consumes that
> much memory.

I would really recommend not using MemoryImageSource. Its an API from the 
java-1.1 days and its not recommended to use it any further. Its just there for 
compatibility reasons.

Setting large amount of pixels using setRGB is not a good practise, best way is 
to directly grab the raster from a BufferedImage:
[code]
byte[] data=((DataBufferByte)tex.getRaster().getDataBuffer()).getData() 
[/code]
this is for a byte-backed BufferedImage, but looks almost the same for an int[] 
one (which I recommend for best performance).

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

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

===========================================================================
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