blob: 2db042e89f31fb93f31aa8a0f66a5f10c8d59173 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--TEST--
Testing imagetruecolortopalette(): out of range parameter 3
--CREDITS--
Rafael Dohms <rdohms [at] gmail [dot] com>
--SKIPIF--
<?php
if (!extension_loaded("gd")) die("skip GD not present");
if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
?>
--FILE--
<?php
$image = imagecreatetruecolor(50, 50);
imagetruecolortopalette($image, true, 0);
imagetruecolortopalette($image, true, -1);
?>
--EXPECTF--
Warning: imagetruecolortopalette(): Number of colors has to be greater than zero and no more than %d in %s line %d
Warning: imagetruecolortopalette(): Number of colors has to be greater than zero and no more than %d in %s line %d
|