What is the difference between these 2 functions from the PHP GD library?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
These two functions are both quite similar in that they copy one picture into another.
The way these functions differ is in the last parameter:
imagecopy()always overwrites all the pixels in the destination with those of the source, whereasimagecopymerge()merges the destination pixels with the source pixels by the amount specified in the extra parameter:The
imagecopy()function is therefore equivalent to callingimagecopymerge()and passing in 100 as the last parameter.