NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

Post a reply

Write your message and submit
Options
Humanity test

What is ten + two?

Go back

Topic review (newest first)

Waccoon
02-23-2008 22:09:27

You need to use the PostScript text function, rather than the string function.

You can read about it (and other GD-lib functions) at the PHP web site:  imagepstext()

Beware:  this function is very troublesome and might cause problems if your web site doesn't have enough memory allocated for PHP (the 8MB default may not be enough).

pickey
02-18-2008 04:39:14

Hello All,


Am using below code :

header("Content-type: image/png");
$string = $_GET['text'];
$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);

How to go about it if I want to use different Font Face i.e. Verdana, Arial Rounded or it could be anything. I am using PNG images.

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB