1--TEST-- 2gif --> 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("imagecreatefromgif")) { 10 die("skip gif read support unavailable"); 11 } 12?> 13--FILE-- 14<?php 15 $cwd = __DIR__; 16 17 echo "GIF to GD1 conversion: "; 18 echo imagegd(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test_gif.gd1") ? 'ok' : 'failed'; 19 echo "\n"; 20 21 echo "GIF to GD2 conversion: "; 22 echo imagegd2(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test_gif.gd2") ? 'ok' : 'failed'; 23 echo "\n"; 24 25 @unlink($cwd . "/test_gif.gd1"); 26 @unlink($cwd . "/test_gif.gd2"); 27?> 28--EXPECT-- 29GIF to GD1 conversion: ok 30GIF to GD2 conversion: ok 31