Re: make a gif

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

 



Excellent. I was trying to figure out how to use colour from the example in the manual.
This is easier.
Thanks!
John

Richard Lynch wrote:
On Mon, April 23, 2007 12:01 pm, John Taylor-Johnston wrote:
I want to print foo@xxxxxxx into a gif or png.
How do I do this?
Thanks. It seems too simple to ask.

------ file: foo.php -------------------------
<?php
  $image = imagecreatetruecolor(400, 20);
  $white = imagecolorallocate($image, 255, 255, 255);
  $black = imagecolorallocate($image, 0, 0, 0);
  imagefilledrectangle($image, 0, 0, 400, 20, $white);
  imagestring($image, 5, 4, 4, 'foo@xxxxxxx', $black);

  header("Content-type: image/png");
  imagepng($image);
?>



<img src="foo.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