开发者

Generating Images With Other Images

I am trying to make a progress bar for my clan website that shows the progress the user has made from their current rank to their next promotion. Basically, my for statements generate the bars that I want to display by progress. I.E. if a user's progress is 25%, it will show 2 yellow bars and 8 bla开发者_开发技巧ck bars. the yellow bars and black bars are seperate images, but I want to combine the output of this script into one single image. I have an image.php script that outputs the results of the function calculations, but not as an image. All the examples I saw on php.net use the background color, font, font color, etc, but all I want to do is combine the images into one. What function should I use for that?


You can do it very simple by using PHP´s imagecopy function.

Examples are available here: http://php.net/manual/en/function.imagecopy.php

You just need to use the function as much times the user needs yellow/black bars.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜