How does it work ?

peter at peter at
Fri Dec 25 05:22:21 PST 1998

>Before kaffeb3, to display .gif and .jpg, I added /DIR/libjpeg.a and /DIR/
>libgif.a in kaffe/kaffe/Makefile but now (with kaffe beta3) .gif are 
>displayed without doing anything and .jpg catch exception. I remark that 
>classes (ImageProducer, ImageConsumer, ...) where added in package java.awt 
>and  I suppose that they are used for that. 

The interesting part is in the native layer (img.c, imggif.c, imgjpeg.c,
imgpng.c), the Java classes (which shouldn't be public) are just responsible for
wrapping the production process (and will be replaced soon)

>So libgif.a is no more needed ? 

Just if you want to display GIFs. In case you don't have one of the image libs,
but try to load such a file, Toolkit.imgCreateFromFile (-> readGifFile,
readJPegFile, readPngFile) should return '0', leaving the Image with a
IMAGE_ERROR|IMAGE_ABORTED state. I guess you got the Exceptions in subsequent
usage of these images?

BTW: My next update will replace giflib (libgif) by the more recent libungif

-- Peter   
      * /\     *
   *   /  \ *
      /  * \ 
   * /  *   \ *

More information about the kaffe mailing list