kkkaiden Posted November 10, 2009 Share Posted November 10, 2009 I have a picture generator that adds text but I want my text to be styled like the one below, how do i do this? Link to comment Share on other sites More sharing options...
Ingolme Posted November 10, 2009 Share Posted November 10, 2009 That's extremely complicated to do with code. The best thing is to have the images of each letter somewhere in a folder and to use them.imagecreatetruecolor() will make sure no quality is lost. Link to comment Share on other sites More sharing options...
kkkaiden Posted November 11, 2009 Author Share Posted November 11, 2009 That's extremely complicated to do with code. The best thing is to have the images of each letter somewhere in a folder and to use them.imagecreatetruecolor() will make sure no quality is lost.Ok, I made all the letters a seperate image, now how do i get it to show up in place of the normal text I have now? Link to comment Share on other sites More sharing options...
justsomeguy Posted November 11, 2009 Share Posted November 11, 2009 You can use the imagecopyresampled function to copy part or all of one image into another one. The function has a lot of parameters, but there are a few examples in the manual:http://www.php.net/manual/en/function.imagecopyresampled.phpOne thing you'll need to keep track of is the width of all of the letters that you've added, so that you know where to put the next one. So the first letter you might add at X 0. If the first letter is 50px, then the second letter you would put at about X 55. If the second letter is 40px wide, then you might put the third at X 100, etc. So you'll need to either keep track of the widths of the previous letters in a counter, or you could say that every letter is 50px and then you just need to keep track of how many letters you've already printed. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.