Annotation of embedaddon/php/ext/gd/tests/xpm2gd.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: xpm --> gd1/gd2 conversion test
! 3: --SKIPIF--
! 4: <?php
! 5: if (!extension_loaded('gd')) {
! 6: die("skip gd extension not available.");
! 7: }
! 8:
! 9: if (!function_exists("imagecreatefromxpm")) {
! 10: die("skip xpm read support unavailable");
! 11: }
! 12: ?>
! 13: --FILE--
! 14: <?php
! 15: $cwd = dirname(__FILE__);
! 16:
! 17: echo "XPM to GD1 conversion: ";
! 18: echo imagegd(imagecreatefromxpm($cwd . "/conv_test.xpm"), $cwd . "/test.gd1") ? 'ok' : 'failed';
! 19: echo "\n";
! 20:
! 21: echo "XPM to GD2 conversion: ";
! 22: echo imagegd2(imagecreatefromxpm($cwd . "/conv_test.xpm"), $cwd . "/test.gd2") ? 'ok' : 'failed';
! 23: echo "\n";
! 24:
! 25: @unlink($cwd . "/test.gd1");
! 26: @unlink($cwd . "/test.gd2");
! 27: ?>
! 28: --EXPECT--
! 29: XPM to GD1 conversion: ok
! 30: XPM to GD2 conversion: ok
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>