Dynamic <IMG>
David Lapointe
dlapointe at mediaone.net
Wed Aug 16 18:12:15 EDT 2000
Ron,
Are you sending out the proper header information? Check the error_log of apache.
You might see a "premature end of headers" error.
I've done graphics on the fly using PHP. They have a good example
too. Also GD ( http://stein.cshl.org/WWW/software/GD/) for a perl or C based solution has some examples of dynamically generating images.
>
> Does /cgi-bin/tile need to output something differently than if it were
> simply dumping a PNG to a file?
>
Yes, you need to send out the header information (header,blankline) then the image.
print ("Content-type: image/png\n\n");
...{send image}
David
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.
>
> 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.
> 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...
>
> --
>
> Ron Peterson
> Systems Manager
> Wallace Floyd Design Group
> 273 Summer Street
> Boston, MA 02210
> 617.350.7400 tel
> 617.350.0051 fax
> rpeterson at wallacefloyd.com
> -
> 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).
--
.david
David Lapointe
Email is not to be used for information or data, only for business.
-- Management
-
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).
More information about the Discuss
mailing list