How can I merge 3 images into 1 image via PHP?

前端 未结 2 946
挽巷
挽巷 2020-12-06 03:21

I really cannot find a way to successfully do it.. I\'ve searched google for this and it either has black shades around the images or all the images don\'t overlap. Could yo

2条回答
  •  心在旅途
    2020-12-06 03:35

    Here's some code to get you started. However you should note that image processing with gd and alpha channels is voodoo.

    
    

    What you still have to do now is checking the return values (look up the image* functions in the manual) to make sure it doesn't fail silently.

    I can't really promise it's going to work with the alpha channels.. If not you'll probably have to go through the comments to the imagecopymerge() or imagecopy() on php.net and see if I missed something.

提交回复
热议问题