- Removed the E_STRICT deprecation notice from "var". (Ilia)
- Fixed debug_zval_dump() to support private and protected members. (Dmitry)
- Fixed bug #36629 (SoapServer::handle() exits on SOAP faults). (Dmitry)
+- Fixed bug #36697 (Transparency is lost when using imagecreatetruecolor).
+ (Pierre)
09 Mar 2006, PHP 5.1.3RC1
- Updated PCRE to version 6.6. (Andrei)
BitsPerPixel = colorstobpp(tim->colorsTotal);
/* All set, let's do it. */
GIFEncode(
- out, tim->sx, tim->sy, interlace, 0, transparent, BitsPerPixel,
+ out, tim->sx, tim->sy, tim->interlace, 0, tim->transparent, BitsPerPixel,
tim->red, tim->green, tim->blue, tim);
if (pim) {
/* Destroy palette based temporary image. */
--- /dev/null
+--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