xref: /PHP-8.4/ext/gd/tests/imagefill_1.phpt (revision a375d547)
1--TEST--
2imagefill() infinite loop with wrong color index
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7    if (!function_exists("imagefttext")) {
8        die("skip imagefttext() not available.");
9    }
10?>
11--FILE--
12<?php
13$im = imagecreate(100,100);
14$white = imagecolorallocate($im, 255,255,255);
15$blue = imagecolorallocate($im, 0,0,255);
16$green = imagecolorallocate($im, 0,255,0);
17
18print_r(imagecolorat($im, 0,0));
19imagefill($im, 0,0,$white + 3);
20print_r(imagecolorat($im, 0,0));
21imagedestroy($im);
22?>
23--EXPECT--
2400
25