Reply to Re: [PHP] Image Rendering/Generation Options

Your name:

Reply:


Posted by Chris on 08/28/05 02:33

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
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация