xref: /PHP-5.5/ext/gd/tests/bug22544.phpt (revision 70650810)
1--TEST--
2Bug #22544 (TrueColor transparency in PNG images).
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(realpath(__FILE__)) . '/bug22544.png';
12	@unlink($dest);
13	$image = imageCreateTruecolor(640, 100);
14	$transparent = imageColorAllocate($image, 0, 0, 0);
15	$red = imageColorAllocate($image, 255, 50, 50);
16	imageColorTransparent($image, $transparent);
17	imageFilledRectangle($image, 0, 0, 640-1, 100-1, $transparent);
18	imagePng($image, $dest);
19	echo md5_file($dest) . "\n";
20	@unlink($dest);
21?>
22--EXPECT--
2310a57d09a2c63fad87b85b38d6b258d6
24