PHP | imagecopymerge() Function (original) (raw)

Last Updated : 11 Jul, 2025

The **imagecopymerge() function is an inbuilt function in PHP that is used to copy and merge the image into a single image. This function returns True on success or False on failure.

**Syntax:

_bool imagecopymerge ( dstimage,dst_image, dstimage,src_image, dstx,dst_x, dstx,dst_y, srcx,src_x, srcx,src_y, srcw,src_w, srcw,src_h, $pct )

**Parameters: This function accepts nine parameters, as mentioned above and described below:

**Return Value: This function returns True on success or False on failure. The below programs illustrate the **imagecopymerge() function in PHP.

**Program 1: **Input Source Image:

**Input Destination Image:

php `

`

**Output:

copy merge image

**Program 2: **Input Source Image:

source image

**Input Destination Image:

destination image

php `

`

**Output:

copy merge image

**Related Articles:

**Reference: https://www.php.net/manual/en/function.imagecopymerge.php