diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2015-06-17 02:25:46 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2015-06-17 02:25:46 +0200 |
commit | 455c7c8e269a68280649ae1bf6c765c197904836 (patch) | |
tree | e856211f9abb5b1bb2ece70baaae8fd3d1f1e048 /ext/gd/tests | |
parent | 28756e99be2b6701e8a781ee54c1e1aeaa039813 (diff) | |
parent | e4917bc747202d5071598221c5fc8c0ed8fe9465 (diff) | |
download | php-git-455c7c8e269a68280649ae1bf6c765c197904836.tar.gz |
Merge branch 'PHP-5.6'
* PHP-5.6:
updated NEWS
updated NEWS
Fixed bug #61221 - imagegammacorrect function loses alpha channel
Diffstat (limited to 'ext/gd/tests')
-rw-r--r-- | ext/gd/tests/bug61221.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/gd/tests/bug61221.phpt b/ext/gd/tests/bug61221.phpt new file mode 100644 index 0000000000..42365da71f --- /dev/null +++ b/ext/gd/tests/bug61221.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #61221 - imagegammacorrect function loses alpha channel +--SKIPIF-- +<?php +if (!extension_loaded('gd')) die('skip gd extension not available'); +?> +--FILE-- +<?php +$imagew = 50; +$imageh = 50; +$img = imagecreatetruecolor($imagew, $imageh); +$blacktransparent = imagecolorallocatealpha($img, 0, 0, 0, 127); +$redsolid = imagecolorallocate($img, 255, 0, 0); +imagefill($img, 0, 0, $blacktransparent); +imageline($img, $imagew / 2, 0, $imagew / 2, $imageh - 1, $redsolid); +imageline($img, 0, $imageh / 2, $imagew - 1, $imageh / 2, $redsolid); +imagegammacorrect($img, 1, 1); +$color = imagecolorat($img, 0, 0); +var_dump($color === $blacktransparent); +imagedestroy($img); +?> +--EXPECT-- +bool(true) |