Re: make a gif

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

 



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" />

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
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