diff options
| author | SVN Migration <svn@php.net> | 2006-04-26 11:08:11 +0000 |
|---|---|---|
| committer | SVN Migration <svn@php.net> | 2006-04-26 11:08:11 +0000 |
| commit | 79f14997b447f5917f16138d00d9877f1eeabae0 (patch) | |
| tree | aac481f9ab3d2192e236780a3c2b5b7fe18e3144 /ext/gd | |
| parent | ad1bbaca04a802350884c07e2899a240d1a04e28 (diff) | |
| download | php-git-php-5.1.2.tar.gz | |
This commit was manufactured by cvs2svn to create tag 'php_5_1_2'.php-5.1.2
Diffstat (limited to 'ext/gd')
| -rw-r--r-- | ext/gd/tests/bug36697.phpt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ext/gd/tests/bug36697.phpt b/ext/gd/tests/bug36697.phpt new file mode 100644 index 0000000000..b257f63e25 --- /dev/null +++ b/ext/gd/tests/bug36697.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #36697 (TrueColor transparency with GIF palette output). +--SKIPIF-- +<?php + if (!extension_loaded('gd')) { + die("skip gd extension not available\n"); + } + if (!GD_BUNDLED) { + die('skip external GD libraries may fail'); + } +?> +--FILE-- +<?php +$dest = dirname(__FILE__) . "/36697.gif"; + +$im = imagecreatetruecolor(192, 36); +$trans_color = imagecolorallocate($im, 255, 0, 0); +$color = imagecolorallocate($im, 255, 255, 255); +imagecolortransparent($im, $trans_color); +imagefilledrectangle($im, 0,0, 192,36, $trans_color); +$c = imagecolorat($im, 191,35); +imagegif($im, $dest); +imagedestroy($im); +$im = imagecreatefromgif($dest); +$c = imagecolorat($im, 191, 35); +$colors = imagecolorsforindex($im, $c); +echo $colors['red'] . ' ' . $colors['green'] . ' ' . $colors['blue']; +@unlink($dest); +?> +--EXPECT-- +255 0 0 |
