Ken Warner wrote:
I hope MemoryImageSource is not going to be depricated!!!
I use it big time in all my applets.
What would be the replacement for MemoryImageSource? I hope
you aren't thinking that BufferedImage is better. BufferedImage
is a giant, poorly thought out hairball...
Here we go again (for those uninitiated Ken sends
something like this every couple of months it seems).
Just because you don't seem to be able to grasp
and use effectively the concept of Color/Sample models,
data buffer and raster doesn't mean others can't.
Please continue to use MIS, it won't go away.
The rest of us can use the flexibility and
performance benefits BufferedImages offer.
Thanks,
Dmitri
[EMAIL PROTECTED] wrote:
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".
===========================================================================
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".
===========================================================================
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".