source: src/router/php7/ext/gd/tests/bug36697-mb.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 2 months ago

update php

File size: 783 bytes
Line 
1--TEST--
2Bug #36697 (TrueColor transparency with GIF palette output).
3--SKIPIF--
4<?php
5        if (!extension_loaded('gd')) {
6                die("skip gd extension not available\n");
7        }
8?>
9--FILE--
10<?php
11$dest = dirname(__FILE__) . "/36697私はガラスを食べられたす.gif";
12
13$im = imagecreatetruecolor(192, 36);
14$trans_color = imagecolorallocate($im, 255, 0, 0);
15$color = imagecolorallocate($im, 255, 255, 255);
16imagecolortransparent($im, $trans_color);
17imagefilledrectangle($im, 0,0, 192,36, $trans_color);
18$c = imagecolorat($im, 191,35);
19imagegif($im, $dest);
20imagedestroy($im);
21$im = imagecreatefromgif($dest);
22$c = imagecolorat($im, 191, 35);
23$colors = imagecolorsforindex($im, $c);
24echo $colors['red'] . ' ' . $colors['green'] . ' ' . $colors['blue'];
25@unlink($dest);
26?>
27--EXPECT--
28255 0 0
Note: See TracBrowser for help on using the repository browser.