1--TEST--
2Testing imagecopymerge() of GD library
3--CREDITS--
4Cleston Viel Vieira de Sousa <cleston [dot] vs [at] gmail [dot] com>
5#testfest PHPSP on 2009-06-20
6
7Updated by Sean Fraaser <frasmage [at] gmail [dot] com>
8PHP[tek] 2017
9--EXTENSIONS--
10gd
11--FILE--
12<?php
13
14$des = imagecreate(120, 120);
15$src = imagecreate(100, 100);
16
17$color_des = imagecolorallocate($des, 50, 50, 200);
18$color_src = imagecolorallocate($src, 255, 255, 255);
19
20imagefill($des, 0, 0, $color_des);
21imagefill($src, 0, 0, $color_src);
22
23var_dump(imagecopymerge($des, $src, 20, 20, 0, 0, 50, 50, 75));
24
25$color = imagecolorat($des, 30, 30);
26$rgb = imagecolorsforindex($des, $color);
27echo $rgb['red'], ", ", $rgb['green'], ", ", $rgb['blue'], "\n";
28
29?>
30--EXPECT--
31bool(true)
32203, 203, 241
33