1--TEST--
2Test imagecolorset() function : basic functionality
3--CREDITS--
4Erick Belluci Tedeschi <erickbt86 [at] gmail [dot] com>
5#testfest PHPSP on 2009-06-20
6--EXTENSIONS--
7gd
8--FILE--
9<?php
10// Create a 300x100 image
11$im = imagecreate(300, 100);
12
13// Set the background to be red
14imagecolorallocate($im, 255, 0, 0);
15
16// Get the color index for the background
17$bg = imagecolorat($im, 0, 0);
18
19// Set the background to be blue
20imagecolorset($im, $bg, 0, 0, 255);
21
22include_once __DIR__ . '/func.inc';
23test_image_equals_file(__DIR__ . '/imagecolorset_basic.png', $im);
24imagedestroy($im);
25?>
26--EXPECT--
27The images are equal.
28