2
xpm --> gd1/gd2 conversion test
5
if (!extension_loaded('gd')) {
6
die("skip gd extension not available.");
9
die("skip external GD libraries always fail");
11
if (!function_exists("imagecreatefromxpm")) {
12
die("skip xpm read support unavailable");
17
$cwd = dirname(__FILE__);
19
echo "XPM to GD1 conversion: ";
20
echo imagegd(imagecreatefromxpm($cwd . "/conv_test.xpm"), $cwd . "/test.gd1") ? 'ok' : 'failed';
23
echo "XPM to GD2 conversion: ";
24
echo imagegd2(imagecreatefromxpm($cwd . "/conv_test.xpm"), $cwd . "/test.gd2") ? 'ok' : 'failed';
27
@unlink($cwd . "/test.gd1");
28
@unlink($cwd . "/test.gd2");
31
XPM to GD1 conversion: ok
32
XPM to GD2 conversion: ok