Re: How to create an image on the fly?
- From: Rik <luiheidsgoeroe@xxxxxxxxxxx>
- Date: Tue, 30 Jan 2007 16:25:31 +0100
Gunnar G <debian@xxxxxxxxx> wrote:
Hi.
I've created an image with this code
Header("Content-Type: image/png");
$image = ImageCreate($W,$H);
$white = ImageColorAllocate($image,255,255,255);
$black = 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 save
the image to a file?
Euhm, adding "hello" to the source of an image isn't really valid no :-)..
-----hello.html----
hello
<img src="imagecreator.php">
--------------------
---imagecreator.php-
//your php code
--------------------
--
Rik Wasmus
.
- Follow-Ups:
- Re: How to create an image on the fly?
- From: Gunnar G
- Re: How to create an image on the fly?
- References:
- How to create an image on the fly?
- From: Gunnar G
- How to create an image on the fly?
- Prev by Date: Re: PHP and upload
- Next by Date: Re: PHP and upload
- Previous by thread: Re: How to create an image on the fly?
- Next by thread: Re: How to create an image on the fly?
- Index(es):
Relevant Pages
|