Annotation of embedaddon/php/ext/gd/tests/imagewbmp.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: imagewbmp
! 3: --SKIPIF--
! 4: <?php
! 5: if (!function_exists('imagecreatefromwbmp')) die("skip gd extension not available\n");
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9: $file = dirname(__FILE__) . '/im.wbmp';
! 10:
! 11: $im = imagecreatetruecolor(6,6);
! 12: imagefill($im, 0,0, 0xffffff);
! 13: imagesetpixel($im, 3,3, 0x0);
! 14: imagewbmp($im, $file);
! 15:
! 16: $im2 = imagecreatefromwbmp($file);
! 17: echo 'test create wbmp: ';
! 18: $c = imagecolorsforindex($im2, imagecolorat($im2, 3,3));
! 19: $failed = false;
! 20: foreach ($c as $v) {
! 21: if ($v != 0) {
! 22: $failed = true;
! 23: }
! 24: }
! 25: echo !$failed ? 'ok' : 'failed';
! 26: echo "\n";
! 27: unlink($file);
! 28: ?>
! 29: --EXPECT--
! 30: test create wbmp: ok
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>