xref: /PHP-8.1/ext/gd/tests/bug51671.phpt (revision a375d547)
1--TEST--
2Bug #51671 (imagefill does not work correctly for small images)
3--EXTENSIONS--
4gd
5--FILE--
6<?php
7$w = 1;
8$h = 50;
9$im = imagecreatetruecolor($w, $h);
10$white = imagecolorallocate($im, 255, 255, 255);
11imagefill($im, 0, 0, $white);
12
13for ($iy = 0; $iy < $h; $iy++) {
14        if (($c = imagecolorat($im, 0, $iy)) != $white) {
15                printf("Failed, (0, $iy) is %X\n", $c);
16        }
17}
18
19echo "OK\n";
20?>
21--EXPECT--
22OK
23