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 (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
9?>
10--FILE--
11<?php
12$image = imagecreatetruecolor(150, 150);
13
14$a = imagecolorallocate($image,255,0,255);
15$b = imagecolorallocate($image,0,255,255);
16
17$half =  imagefilledarc ( $image, 75, 75, 70, 70, 0, 180, $a, IMG_ARC_PIE );
18$half2 =  imagefilledarc ( $image, 75, 55, 80, 70, 0, -180, $b, IMG_ARC_PIE );
19
20var_dump(imagetruecolortopalette($image, true, 2));
21
22ob_start();
23imagepng($image, null, 9);
24$img = ob_get_contents();
25ob_end_clean();
26
27echo md5(base64_encode($img));
28?>
29--EXPECT--
30bool(true)
310843f63ab2f9fddedd69b0b421686bc5