xref: /PHP-7.4/ext/gd/tests/bug22544.phpt (revision dc09f309)
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	$image = imageCreateTruecolor(640, 100);
12	$transparent = imageColorAllocate($image, 0, 0, 0);
13	$red = imageColorAllocate($image, 255, 50, 50);
14	imageColorTransparent($image, $transparent);
15	imageFilledRectangle($image, 0, 0, 640-1, 100-1, $transparent);
16	include_once __DIR__ . '/func.inc';
17	test_image_equals_file(__DIR__ . '/bug22544.png', $image);
18?>
19--EXPECT--
20The images are equal.
21