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