imagecolorset_basic.phpt [plain text]
--TEST--
Test imagecolorset() function : basic functionality
--CREDITS--
Erick Belluci Tedeschi <erickbt86 [at] gmail [dot] com>
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
if (!extension_loaded('gd')) {
die('skip gd extension is not loaded');
}
?>
--FILE--
<?php
$im = imagecreate(300, 100);
imagecolorallocate($im, 255, 0, 0);
$bg = imagecolorat($im, 0, 0);
imagecolorset($im, $bg, 0, 0, 255);
include_once __DIR__ . '/func.inc';
test_image_equals_file(__DIR__ . '/imagecolorset_basic.png', $im);
imagedestroy($im);
?>
--EXPECT--
The images are equal.