Annotation of embedaddon/php/ext/gd/tests/bug51671.phpt, revision 1.1

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

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