Merge branch 'PHP-7.0' into PHP-7.1

This commit is contained in:
Christoph M. Becker 2016-09-11 18:40:46 +02:00
commit c911aa9def

View file

@ -23,10 +23,19 @@ imagecolorallocate($image, 0, 0, 255); // first palette color = background
$red = imagecolorallocate($image, 255, 0, 0);
imagefill($image, 0, 0, $red);
$cropped = imagecrop($image, ['x' => 0, 'y' => 0, 'width' => 250, 'height' => 250]);
var_dump(imagecolorat($cropped, 249, 249) === $red);
var_dump(imagecolorsforindex($cropped, imagecolorat($cropped, 249, 249)));
imagedestroy($image);
imagedestroy($cropped);
?>
--EXPECT--
bool(true)
bool(true)
array(4) {
["red"]=>
int(255)
["green"]=>
int(0)
["blue"]=>
int(0)
["alpha"]=>
int(0)
}