in reply to display gif image

One solution would be to create the GIF file in a path that is available through your web server (e.g. images). Then use the relative web path in your CGI script:
# Open the file: open (GIF, "/home/httpd/images/my_perl_gif.gif") || die "$!\n"; my ($image, $buff); while (read GIF, $buff, 1024) { $image.=$buff; } close GIF; # Now send the information to the browser: print "Content-Type: text/html\n\n"; print '<html><body>'; print "<img src='/images/my_perl_gif.gif' alt='My GIF'>"; print '</body></html>';
Chris

Replies are listed 'Best First'.
Re: Re: display gif image
by ckohl1 (Hermit) on Apr 27, 2001 at 00:24 UTC
    Update:

    I just realized that the file code you posted was an attempt to output the GIF to the agent browser. At first, from the context of your post, I had made the assumption that you were building the GIF with your snippet.

    What you want to do is simply tell the agent, calling on the web server, where the file to be displayed lives. You can do that using the IMG tag. You will also want to build the GIF in a place that is available to web agents.

    I apologize for my hurried initial reply.

    Chris