Jump to content

Imagecreate()


kkkaiden

Recommended Posts

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

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

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

Archived

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

×
×
  • Create New...