rofl90 Posted October 17, 2008 Share Posted October 17, 2008 I'm creating a font generator, and I have somebody enter in a string, then I get all the images needed as in h.png e.png l.png l.png o.png Then I need to join them together, horizontally, how would I accomplish this, and then present the image? Link to comment https://forums.phpfreaks.com/topic/128797-using-gd-to-join-x-images-together-as-a-font-generator/ Share on other sites More sharing options...
ratcateme Posted October 17, 2008 Share Posted October 17, 2008 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. Link to comment https://forums.phpfreaks.com/topic/128797-using-gd-to-join-x-images-together-as-a-font-generator/#findComment-667784 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.