Re: Image Rendering/Generation Options

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

 



Well, you can't output HTML *and* an image in the same request. What you can do is generate HTML in one script, put image tags in the HTML that references a another script, which actually outputs the image.

So something like:

<img src="/myimage.php?id=4" width="10" height="30" />

Then in myimage.php you would output the correct headers (such as "Content-Type: image/gif" for example) and output the raw binary data that makes up the image.

You can probably glean a lot of useful information from the GD portion of the manual:

http://www.php.net/gd

Chris

Dan Trainor wrote:

Hello, all -

I've seen a few times, albeit I don't know how, people generate images on a page in different ways, such as maybe using base64 to output the raw image data into a page? Is this correct?

If so, what does it "look" like?  How would one go about doing this?

If not, what are my options to achieve something like this? What are my alternatives? What kind of performance impact, if any, does this make on both the load on the server and the rendering time for a given image to the client? Last but certainly not least, is this a dumb idea?

What I'm looking to do is to deliver dynamic content to the browser, without writing images to disk. I simply want what would be written to disk, be displayed in a specific area I'm talking about.

I'm sorry if this is a dumb question. Once I get a few more clues here, I'll be able to figure the rest of this out pretty well, I'm quite sure.

As always, thanks for the time
-dant


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux