mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
Merge branch 'PHP-7.0' into PHP-7.1
This commit is contained in:
commit
c911aa9def
1 changed files with 11 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue