开发者

Inserting image inside another image [closed]

开发者 https://www.devze.com 2023-04-02 18:57 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

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:

  1. 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)
  2. imagecopy copies one image onto another (here, the profile pic onto the base image)
  3. imagettftext writes text on your image, given a font (the scores)
  4. Your image is almost done, you only have to convert it from a PHP resource back to a JPEG image with imagejpeg
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号