xref: /PHP-7.0/ext/gd/tests/bug43828.phpt (revision dc09f309)
1--TEST--
2Bug #43828 (broken transparency of imagearc for truecolor in blendingmode)
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip ext/gd not available');
6if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
7	die("skip test requires GD 2.2.2 or higher");
8}
9?>
10--FILE--
11<?php
12
13$im = imagecreatetruecolor(100,100);
14
15$transparent = imagecolorallocatealpha($im, 255, 255, 255, 80);
16imagefilledrectangle($im, 0,0, 99,99, $transparent);
17$color = imagecolorallocatealpha($im, 0, 255, 0, 100);
18imagefilledarc($im, 49, 49, 99,99, 0 , 360, $color, IMG_ARC_PIE);
19
20include_once __DIR__ . '/func.inc';
21test_image_equals_file(__DIR__ . '/bug43828.png', $im);
22
23imagedestroy($im);
24?>
25--EXPECT--
26The images are equal.
27