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