1--TEST-- 2Testing imagecopymergegray() of GD library 3--CREDITS-- 4Sean Fraser <frasmage [at] gmail [dot] com> 5PHP[tek] 2017 6--EXTENSIONS-- 7gd 8--FILE-- 9<?php 10 11$des = imagecreate(120, 120); 12$src = imagecreate(100, 100); 13 14$color_des = imagecolorallocate($des, 50, 50, 200); 15$color_src = imagecolorallocate($src, 255, 255, 0); 16 17imagefill($des, 0, 0, $color_des); 18imagefill($src, 0, 0, $color_src); 19 20var_dump(imagecopymergegray($des, $src, 20, 20, 0, 0, 50, 50, 75)); 21 22$color = imagecolorat($des, 30, 30); 23$rgb = imagecolorsforindex($des, $color); 24echo $rgb['red'], ", ", $rgb['green'], ", ", $rgb['blue'], "\n"; 25 26?> 27--EXPECT-- 28bool(true) 29208, 208, 16 30