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 = __DIR__ . "/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 29