Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Mon Jan 21, 2008 12:15 pm Post subject: [PHP] Graphic question. [UPDATED, ANOTHER QUESTION] |
|
|
Hey,
Well thx appalsap for trying to help me but I've got it already.
I use this:
| Code: | <?php
header ("Content-type: image/png");
$im = @imagecreatetruecolor(200, 20) // 200 is the width - and 20 the height
or die("Cannot Initialize new GD image stream");
$text_color = imagecolorallocate($im, 233, 14, 91);
$color = imagecolorallocatealpha($im, 151, 151, 151, 127);
imagefill($im, 0, 0, $color);
imagestring($im, 15, 5, 2, ($_GET[text]), $text_color);
imagepng($im);
imagedestroy($im);
?>
|
But I want that the pictures width is the width of the text +5 or so.
How to I do that?
Preview: http://funnyx.fu.funpic.de/test2.php?text=Hello%20CEF
Last edited by Reak on Mon Jan 21, 2008 1:12 pm; edited 5 times in total |
|