Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dynamic <IMG>



On Wed, 16 Aug 2000, Ron Peterson wrote:
>I'm trying to generate some PNG's on the fly, and include them in some
>web pages.  The C program I wrote to create them dumps the PNG data
>stream to stdout.  I can dump the output to a file and it looks perfect.
>
>I don't want to include a PNG _file_ in an <img> tag, though, because
>some stupid browsers cache it, no matter how they're configured.
>
>So, no problem, I think.  Rather than point to a file w/ my <img> tag,
>I'll point to the program.  Like <img src="/cgi-bin/tile" alt="blah
>blah" width="512" height="512" border=0>.  Doesn't work.  I've checked
>that ownership and permissions of program are o.k. to be run by Apache.
>
>Does /cgi-bin/tile need to output something differently than if it were
>simply dumping a PNG to a file? 
>
>I'm confused.  I thought this kind of thing was supposed to work.  No? 
>If this is possible, let me know, and I'll keep hacking.  As long as I
>know I'm not wasting my time...

Yes, it works. For example, I was working on this today
http://cartalk.cars.com/Tools/survey-results-rc-top-bot.pl
and the .gifs are generated on the fly by Perl scripts
(right-click on image, select properties to see).

I wonder if you're forgetting to put a 'image/gif' header?  :)

-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org