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 (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
10    if (!(imagetypes() & IMG_PNG)) {
11        die("skip No PNG support");
12    }
13?>
14--FILE--
15<?php
16// Create a 200x100 image
17$image = imagecreatetruecolor(200, 100);
18$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
19$black = imagecolorallocate($image, 0x00, 0x00, 0x00);
20
21// Set the background to be white
22imagefilledrectangle($image, 0, 0, 299, 99, $white);
23
24// Set the line thickness to 5
25imagesetthickness($image, 5);
26
27// Draw the rectangle
28imagerectangle($image, 14, 14, 185, 85, $black);
29
30include_once __DIR__ . '/func.inc';
31test_image_equals_file(__DIR__ . '/imagesetthickness_basic.png', $image);
32?>
33--EXPECT--
34The images are equal.
35