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--SKIPIF--
10<?php
11if (!extension_loaded("gd")) die("skip GD not present");
12?>
13--FILE--
14<?php
15
16$des = imagecreate(120, 120);
17$src = imagecreate(100, 100);
18
19$color_des = imagecolorallocate($des, 50, 50, 200);
20$color_src = imagecolorallocate($src, 255, 255, 255);
21
22imagefill($des, 0, 0, $color_des);
23imagefill($src, 0, 0, $color_src);
24
25var_dump(imagecopymerge($des, $src, 20, 20, 0, 0, 50, 50, 75));
26
27$color = imagecolorat($des, 30, 30);
28$rgb = imagecolorsforindex($des, $color);
29echo $rgb['red'], ", ", $rgb['green'], ", ", $rgb['blue'], "\n";
30
31?>
32--EXPECT--
33bool(true)
34203, 203, 241
35