You are here: Re: How to create an image on the fly? « PHP Programming Language « IT news, forums, messages
Re: How to create an image on the fly?

Posted by Rik on 01/30/07 15:25

Gunnar G <debian@comhem.se> wrote:

> Hi.
>
> I've created an image with this code
>
> Header("Content-Type: image/png");
> $image =3D ImageCreate($W,$H);
> $white =3D ImageColorAllocate($image,255,255,255);
> $black =3D ImageColorAllocate($image,0,0,0);
> ImageLine($image,0,0,$W,$H,$black);
> ImagePng($image);
> ImageDestroy($image);
>
> but now I wish to add a line
>
> echo "Hello";
>
> before the image code, then I only get garbage, the header command is
> probably invalid now. So how do I create the image without having to s=
ave
> the image to a file?

Euhm, adding "hello" to the source of an image isn't really valid no :-)=
..

-----hello.html----
hello
<img src=3D"imagecreator.php">
--------------------
---imagecreator.php-
//your php code
--------------------

-- =

Rik Wasmus

 

Navigation:

[Reply to this 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

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