How does it work ?

peter at transvirtual.com peter at transvirtual.com
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
<http://prtr-13.ucsc.edu/~badger/software/libungif.shtml>.

-- Peter   
        <>
      * /\     *
   *   /  \ *
      /  * \ 
   * /  *   \ *
     ---||--- 



More information about the kaffe mailing list