1--TEST-- 2gif --> gd1/gd2 conversion test 3--EXTENSIONS-- 4gd 5--SKIPIF-- 6<?php 7 if (!GD_BUNDLED && version_compare(GD_VERSION, '2.3.3', '>=')) { 8 die("skip test requires GD 2.3.2 or older"); 9 } 10 11 if (!function_exists("imagecreatefromgif")) { 12 die("skip gif read support unavailable"); 13 } 14?> 15--FILE-- 16<?php 17 $cwd = __DIR__; 18 19 echo "GIF to GD1 conversion: "; 20 echo imagegd(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test_gif.gd1") ? 'ok' : 'failed'; 21 echo "\n"; 22 23 echo "GIF to GD2 conversion: "; 24 echo imagegd2(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test_gif.gd2") ? 'ok' : 'failed'; 25 echo "\n"; 26 27 @unlink($cwd . "/test_gif.gd1"); 28 @unlink($cwd . "/test_gif.gd2"); 29?> 30--EXPECT-- 31GIF to GD1 conversion: ok 32GIF to GD2 conversion: ok 33