1--TEST-- 2xbm --> png conversion test 3--SKIPIF-- 4<?php 5 if (!extension_loaded('gd')) { 6 die("skip gd extension not available."); 7 } 8 if (!function_exists("imagepng")) { 9 die("skip png support unavailable"); 10 } 11 if (!function_exists("imagecreatefromxbm")) { 12 die("skip xbm read support unavailable"); 13 } 14?> 15--FILE-- 16<?php 17 $cwd = __DIR__; 18 19 echo "XBM to PNG conversion: "; 20 echo imagepng(imagecreatefromxbm($cwd . "/conv_test.xbm"), $cwd . "/test_xbm.png") ? 'ok' : 'failed'; 21 echo "\n"; 22 23 @unlink($cwd . "/test_xbm.png"); 24?> 25--EXPECT-- 26XBM to PNG conversion: ok 27