Inserting image inside another image [closed]
I am developing a Facebook Application,I am trying to Insert images of my top 5 friends inside an other image through Php Code? How can do this I had searched the PhP Draw function but couldn't Find anyone. Through this Image you may get what I want to do ![enter image description here][1] I had seen this Function
http://www.php.net/manual/en/function.imagecreatefromjpeg.p开发者_运维问答hp
You're on the right track with the function you've given. However, it doesn't quite work like this. Here's how PHP could handle your situation:
- imagecreatefromjpeg converts a JPEG image to an internal PHP image format called "resource" (you need to convert both your source image and your profile pic in order for them to be manipulated)
- imagecopy copies one image onto another (here, the profile pic onto the base image)
- imagettftext writes text on your image, given a font (the scores)
- Your image is almost done, you only have to convert it from a PHP resource back to a JPEG image with imagejpeg
精彩评论