Hi Peter. If you want to create GIFs, use ACME labs excellent free
gifencoder(http://www.acme.com/), and then do something like this:


Frame frame = null;
Graphics g = null;
FileOutputStream fileOut = null;

try {
        //create an unshown frame
        frame = new Frame();
        frame.addNotify();

        //get a graphics region, using the frame
        Image image = frame.createImage(WIDTH, HEIGHT);
        g = image.getGraphics();

        //manipulate the image
        g.drawString("Hello world", 0, 0);

        //get an ouputstream to a file
        fileOut = new FileOutputStream("test.gif");
        GifEncoder encoder = new GifEncoder(image, fileOut);
        encoder.encode();
} catch (Exception e) {
        ;
} finally {
        //clean up
        if (g != null) g.dispose();
        if (frame != null) frame.removeNotify();
        if (fileOut != null) {
                try { fileOut.close(); }
                catch (IOException ioe) { ; }
        }
}

hope this works for you.
matti

[EMAIL PROTECTED]  +46739807966 +4684575800
razorfish       nybrogatan 55 11485 stockholm

> -----Original Message-----
> From: Martin Peter [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 16, 1999 10:25 AM
> To: [EMAIL PROTECTED]
> Subject: Dynamic GIF
>
>
> I have a JSP page and want to dyanamically generate a gif for
> display on
> the page.
>
> I store my gif's in a directroy server and read them out as a
> byte array,
> this bit okay. I am unsure as to how I get it to display on the page.
>
> Thanks
> Peter.
>
> ==============================================================
> =============
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body
> of the message "signoff JSP-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 JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to