Holger Wagner wrote:

> This might be slightly off-topic, but could you explain how you did
> this? We'd very much like to be able to avoid GIF as well, and PNG
> sounds like a good alternative... (I'm kind of surprised that java only
> supports GIF and JPG in the standard JDK - even in 1.2)

Side note: JDK 1.3 supports PNG. However, I suspect they haven't changed
the rest of thier imageloading code so it still takes up 4 times the
amount of memory than it should.

We created a set of standard URL content handlers that we use to load an
image. ie, we create a java.net.URL (or fetch it from
ClassLoader.getResource()) and then getContent() on that. This returns
us a full java.awt.image.BufferedImage that we create in native code. On
the native side, we've just taken a bunch of the standard libraries from
off the 'net and thrown some native wrappers around it. Very simple,
very trivial. Actually, so trivial, it took us about 3 days to write
_every_ from scratch and we now support about 12 different image types.
Needless to say, we're absolutely boggled over why Sun has not done this
in the past. Surely one engineer for 3 days of work (shit, they can use
our code if they want!) would satisfy about 2 years worth of bug reports
on JDC, but apparently image loading memory consumption is not a concern
to Sun. They've never had to write a real Java application, just toy
demos so obviously it isn't a problem....

--
Justin Couch                                   Author, Java Hacker
Snr Software Engineer                     [EMAIL PROTECTED]
ADI Ltd, Systems Group              http://www.vlc.com.au/~justin/
Java3D FAQ:       http://tintoy.ncsa.uiuc.edu/~srp/java3d/faq.html
-------------------------------------------------------------------
"Look through the lens, and the light breaks down into many lights.
 Turn it or move it, and a new set of arrangements appears... is it
 a single light or many lights, lights that one must know how to
 distinguish, recognise and appreciate? Is it one light with many
 frames or one frame for many lights?"      -Subcomandante Marcos
-------------------------------------------------------------------

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

Reply via email to