RE: [PHP] imagecreatefromstring
| From: | Jay Blanchard | Date: | Mon, 22 Aug 2005 13:05:27 +0000 |
| Subject: | RE: [PHP] imagecreatefromstring | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-221079@lists.php.net to get a copy of this message | ||
[snip]
This is my script
header("Content-type: image/png");
$string = 'hello';
$im = imagecreatefrompng("images/button1.png");
$orange = imagecolorallocate($im, 220, 210, 60);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
[/snip]
try placing the full path to button1.png in the arguement for the
function