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