[pmwiki-devel] php imagepng

Patrick R. Michaud pmichaud at pobox.com
Wed Nov 8 10:15:55 CST 2006


On Wed, Nov 08, 2006 at 03:52:11PM +0000, Hans wrote:
> All is fine, but I wonder about outputting the raw
> image imagepng() produces on a wiki page.
> 
> The standard php way is to create a php script [...]
> and then inserting in your html an image tag with
>   src='path to script'
> 
> Now I wonder if there is a way for the function called by a markup
> directive to return the image directly, without having to insert an
> ugly link to a php script masquerading as a png image.

No.  AFAIK, the (only) way the browser knows to display an image
is by using an <img ... /> tag or something equivalent that does
a separate fetch of the image -- there's not a way to embed raw 
image data directly into an HTML document.  

It's just the way HTML is designed/written.

Pm



More information about the pmwiki-devel mailing list