Jump to content

Using GD to join X images together, as a font generator.


rofl90

Recommended Posts

try this

not tested

$width = 20*strlen($string);
$height = 50;
$gd = imagecreate($width,$height);
$letters = str_split($string);
foreach($letters as $key => $letter){
$letter_gd = imagecreatefrompng($letter.".png");
imagecopy($gd,$letter_gd,($key)*20,0,0,0,20,50);
}
header('Content-type: image/png');
imagepng($gd);

 

Scott.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.