1--TEST--
2Testing imagetruecolortopalette() of GD library
3--CREDITS--
4Rafael Dohms <rdohms [at] gmail [dot] com>
5--EXTENSIONS--
6gd
7--SKIPIF--
8<?php
9    if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
10        die("skip test requires GD 2.2.2 or higher");
11    }
12    if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
13?>
14--FILE--
15<?php
16$image = imagecreatetruecolor(150, 150);
17
18$a = imagecolorallocate($image,255,0,255);
19$b = imagecolorallocate($image,0,255,255);
20
21$half =  imagefilledarc ( $image, 75, 75, 70, 70, 0, 180, $a, IMG_ARC_PIE );
22$half2 =  imagefilledarc ( $image, 75, 55, 80, 70, 0, -180, $b, IMG_ARC_PIE );
23
24var_dump(imagetruecolortopalette($image, true, 2));
25
26include_once __DIR__ . '/func.inc';
27test_image_equals_file(__DIR__ . '/imagetruecolortopalette_basic.png', $image);
28?>
29--EXPECT--
30bool(true)
31The images are equal.
32