xref: /php-src/ext/gd/tests/bug36697-mb.phpt (revision a375d547)
1--TEST--
2Bug #36697 (TrueColor transparency with GIF palette output).
3--EXTENSIONS--
4gd
5--FILE--
6<?php
7$dest = __DIR__ . "/36697私はガラスを食べられます.gif";
8
9$im = imagecreatetruecolor(192, 36);
10$trans_color = imagecolorallocate($im, 255, 0, 0);
11$color = imagecolorallocate($im, 255, 255, 255);
12imagecolortransparent($im, $trans_color);
13imagefilledrectangle($im, 0,0, 192,36, $trans_color);
14$c = imagecolorat($im, 191,35);
15imagegif($im, $dest);
16imagedestroy($im);
17$im = imagecreatefromgif($dest);
18$c = imagecolorat($im, 191, 35);
19$colors = imagecolorsforindex($im, $c);
20echo $colors['red'] . ' ' . $colors['green'] . ' ' . $colors['blue'];
21@unlink($dest);
22?>
23--EXPECT--
24255 0 0
25