Annotation of embedaddon/php/ext/gd/tests/bug60160.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #60160 (imagefill does not work correctly for small images) @see bug51671
                      3: --SKIPIF--
                      4: <?php
                      5:        if(!extension_loaded('gd')){ die('skip gd extension not available'); }
                      6: ?>
                      7: --FILE--
                      8: <?php
                      9: $w = 3;
                     10: $h = 50;
                     11: $im = imagecreatetruecolor($w, $h);
                     12: $white = imagecolorallocate($im, 255, 255, 255);
                     13: imagefill($im, 0, 0, $white);
                     14: 
                     15: for ($ix = 0; $ix < $w; $ix++) {
                     16:         for ($iy = 0; $iy < $h; $iy++) {
                     17:                 if (($c = imagecolorat($im, $ix, $iy)) != $white) {
                     18:                         printf("Failed, ($ix, $iy) is %X\n", $c);
                     19:                 }
                     20:         }
                     21: }
                     22: 
                     23: echo "OK\n";
                     24: ?>
                     25: --EXPECTF--
                     26: OK

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>