pajoye Sat Jun 2 15:35:35 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/gd/tests bug39780_extern.phpt createfromwbmp2_extern.phpt libgd00086_extern.phpt
Modified files: /php-src/ext/gd/tests bug19366.phpt bug22544.phpt bug24155.phpt bug24594.phpt bug27582_1.phpt bug28147.phpt bug36697.phpt bug37346.phpt bug37360.phpt bug38112.phpt bug39082.phpt bug39273.phpt bug39286.phpt bug39366.phpt bug39508.phpt bug39780.phpt createfromgd2.phpt createfromwbmp.phpt createfromwbmp2.phpt gif2gd.phpt gif2jpg.phpt gif2png.phpt imagefilter.phpt imagewbmp.phpt jpeg2png.phpt jpg2gd.phpt libgd00086.phpt png2gd.phpt pngcomp.phpt xpm2gd.phpt xpm2jpg.phpt xpm2png.phpt Log: - enable tests even when an external GD is used. Latest releases (2.0.34 or 2.0.35) work.
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug19366.phpt?r1=1.4&r2=1.4.4.1&diff_format=u Index: php-src/ext/gd/tests/bug19366.phpt diff -u php-src/ext/gd/tests/bug19366.phpt:1.4 php-src/ext/gd/tests/bug19366.phpt:1.4.4.1 --- php-src/ext/gd/tests/bug19366.phpt:1.4 Sun Apr 3 11:17:54 2005 +++ php-src/ext/gd/tests/bug19366.phpt Sat Jun 2 15:35:34 2007 @@ -1,9 +1,8 @@ --TEST-- Bug #19366 (gdimagefill() function crashes (fixed in bundled libgd)) --SKIPIF-- -<?php - if (!extension_loaded('gd')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); +<?php + if (!extension_loaded('gd')) die("skip gd extension not available\n"); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug22544.phpt?r1=1.2&r2=1.2.6.1&diff_format=u Index: php-src/ext/gd/tests/bug22544.phpt diff -u php-src/ext/gd/tests/bug22544.phpt:1.2 php-src/ext/gd/tests/bug22544.phpt:1.2.6.1 --- php-src/ext/gd/tests/bug22544.phpt:1.2 Thu Apr 8 08:39:41 2004 +++ php-src/ext/gd/tests/bug22544.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,10 @@ --TEST-- Bug #22544 (TrueColor transparency in PNG images). --SKIPIF-- -<?php - if (!extension_loaded('gd')) { +<?php + if (!extension_loaded('gd')) { die("skip gd extension not available\n"); } - if (!GD_BUNDLED) { - die('skip external GD libraries may fail'); - } ?> --FILE-- <?php @@ -19,7 +16,7 @@ imageColorTransparent($image, $transparent); imageFilledRectangle($image, 0, 0, 640-1, 100-1, $transparent); imagePng($image, $dest); - echo md5_file($dest) . "\n"; + echo md5_file($dest) . "\n"; @unlink($dest); ?> --EXPECT-- http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug24155.phpt?r1=1.3&r2=1.3.4.1&diff_format=u Index: php-src/ext/gd/tests/bug24155.phpt diff -u php-src/ext/gd/tests/bug24155.phpt:1.3 php-src/ext/gd/tests/bug24155.phpt:1.3.4.1 --- php-src/ext/gd/tests/bug24155.phpt:1.3 Mon Apr 25 11:36:24 2005 +++ php-src/ext/gd/tests/bug24155.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,11 @@ --TEST-- Bug #24155 (gdImageRotate270 rotation problem). --SKIPIF-- -<?php - if (!extension_loaded('gd')) { +<?php + if (!extension_loaded('gd')) { die("skip gd extension not available\n"); } - if (!GD_BUNDLED) { - die('skip external GD libraries may fail'); - } + if (!function_exists("imagerotate")) die("skip requires bundled GD library\n"); ?> --FILE-- <?php @@ -15,7 +13,7 @@ @unlink($dest); $im = imagecreatetruecolor(30, 50); - imagefill($im, 0, 0, (16777215 - 255)); + imagefill($im, 0, 0, (16777215 - 255)); $im = imagerotate($im, 270, 255); imagepng($im, $dest); http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug24594.phpt?r1=1.2&r2=1.2.8.1&diff_format=u Index: php-src/ext/gd/tests/bug24594.phpt diff -u php-src/ext/gd/tests/bug24594.phpt:1.2 php-src/ext/gd/tests/bug24594.phpt:1.2.8.1 --- php-src/ext/gd/tests/bug24594.phpt:1.2 Wed Jul 23 00:17:29 2003 +++ php-src/ext/gd/tests/bug24594.phpt Sat Jun 2 15:35:34 2007 @@ -5,9 +5,6 @@ if (!extension_loaded('gd')) { die("skip gd extension not available\n"); } - if (!GD_BUNDLED) { - die('skip external GD libraries may fail'); - } ?> --FILE-- <?php @@ -82,4 +79,4 @@ ?> --EXPECT-- 000000111111101010 -111111111111111111 +111111111111111111 http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug27582_1.phpt?r1=1.5&r2=1.5.4.1&diff_format=u Index: php-src/ext/gd/tests/bug27582_1.phpt diff -u php-src/ext/gd/tests/bug27582_1.phpt:1.5 php-src/ext/gd/tests/bug27582_1.phpt:1.5.4.1 --- php-src/ext/gd/tests/bug27582_1.phpt:1.5 Mon Apr 25 11:36:24 2005 +++ php-src/ext/gd/tests/bug27582_1.phpt Sat Jun 2 15:35:34 2007 @@ -3,7 +3,6 @@ --SKIPIF-- <?php if (!extension_loaded('gd')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug28147.phpt?r1=1.2&r2=1.2.6.1&diff_format=u Index: php-src/ext/gd/tests/bug28147.phpt diff -u php-src/ext/gd/tests/bug28147.phpt:1.2 php-src/ext/gd/tests/bug28147.phpt:1.2.6.1 --- php-src/ext/gd/tests/bug28147.phpt:1.2 Sun Apr 25 19:45:02 2004 +++ php-src/ext/gd/tests/bug28147.phpt Sat Jun 2 15:35:34 2007 @@ -1,9 +1,9 @@ --TEST-- Bug #28147 (Crash with anti-aliased line) --SKIPIF-- -<?php - if (!extension_loaded('gd')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); +<?php + if (!extension_loaded('gd')) die("skip gd extension not available\n"); + if (!function_exists("imageantialias")) die("skip requires bundled GD library\n"); ?> --FILE-- <?php @@ -13,12 +13,12 @@ $im = imagecreatetruecolor(300, 300); $w = imagecolorallocate($im, 255, 255, 255); $red = imagecolorallocate($im, 255, 0, 0); - + imagefilledrectangle($im,0,0,299,299,$w); - + imageantialias($im,true); imageline($im, 299, 299, 0, 299, $red); - + imagedestroy($im); echo "Alive\n"; http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug36697.phpt?r1=1.1.2.1&r2=1.1.2.1.2.1&diff_format=u Index: php-src/ext/gd/tests/bug36697.phpt diff -u php-src/ext/gd/tests/bug36697.phpt:1.1.2.1 php-src/ext/gd/tests/bug36697.phpt:1.1.2.1.2.1 --- php-src/ext/gd/tests/bug36697.phpt:1.1.2.1 Mon Mar 13 21:56:38 2006 +++ php-src/ext/gd/tests/bug36697.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,10 @@ --TEST-- Bug #36697 (TrueColor transparency with GIF palette output). --SKIPIF-- -<?php - if (!extension_loaded('gd')) { +<?php + if (!extension_loaded('gd')) { die("skip gd extension not available\n"); } - if (!GD_BUNDLED) { - die('skip external GD libraries may fail'); - } ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug37346.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/gd/tests/bug37346.phpt diff -u php-src/ext/gd/tests/bug37346.phpt:1.1.2.1 php-src/ext/gd/tests/bug37346.phpt:1.1.2.2 --- php-src/ext/gd/tests/bug37346.phpt:1.1.2.1 Sun May 7 16:37:40 2006 +++ php-src/ext/gd/tests/bug37346.phpt Sat Jun 2 15:35:34 2007 @@ -1,9 +1,8 @@ --TEST-- Bug #37346 (gdimagecreatefromgif, bad colormap) --SKIPIF-- -<?php - if (!extension_loaded('gd')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); +<?php + if (!extension_loaded('gd')) die("skip gd extension not available\n"); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug37360.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/gd/tests/bug37360.phpt diff -u php-src/ext/gd/tests/bug37360.phpt:1.1.2.3 php-src/ext/gd/tests/bug37360.phpt:1.1.2.4 --- php-src/ext/gd/tests/bug37360.phpt:1.1.2.3 Wed Apr 4 01:34:50 2007 +++ php-src/ext/gd/tests/bug37360.phpt Sat Jun 2 15:35:34 2007 @@ -1,9 +1,8 @@ --TEST-- Bug #37360 (gdimagecreatefromgif, bad image sizes) --SKIPIF-- -<?php - if (!extension_loaded('gd')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); +<?php + if (!extension_loaded('gd')) die("skip gd extension not available\n"); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug38112.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/gd/tests/bug38112.phpt diff -u php-src/ext/gd/tests/bug38112.phpt:1.1.2.1 php-src/ext/gd/tests/bug38112.phpt:1.1.2.2 --- php-src/ext/gd/tests/bug38112.phpt:1.1.2.1 Mon Jul 17 14:30:21 2006 +++ php-src/ext/gd/tests/bug38112.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,10 @@ --TEST-- Bug #38112 (GIF Invalid Code size ). --SKIPIF-- -<?php - if (!extension_loaded('gd')) { +<?php + if (!extension_loaded('gd')) { die("skip gd extension not available\n"); } - if (!GD_BUNDLED) { - die('skip external GD libraries may fail'); - } ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug39082.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/gd/tests/bug39082.phpt diff -u php-src/ext/gd/tests/bug39082.phpt:1.1.2.1 php-src/ext/gd/tests/bug39082.phpt:1.1.2.2 --- php-src/ext/gd/tests/bug39082.phpt:1.1.2.1 Sun Oct 8 17:36:10 2006 +++ php-src/ext/gd/tests/bug39082.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,10 @@ --TEST-- Bug #39082 (Output image to stdout segfaults). --SKIPIF-- -<?php - if (!extension_loaded('gd')) { +<?php + if (!extension_loaded('gd')) { die("skip gd extension not available\n"); } - if (!GD_BUNDLED) { - die('skip external GD libraries may fail'); - } ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug39273.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/gd/tests/bug39273.phpt diff -u php-src/ext/gd/tests/bug39273.phpt:1.1.2.1 php-src/ext/gd/tests/bug39273.phpt:1.1.2.2 --- php-src/ext/gd/tests/bug39273.phpt:1.1.2.1 Sat Nov 4 02:21:06 2006 +++ php-src/ext/gd/tests/bug39273.phpt Sat Jun 2 15:35:34 2007 @@ -1,9 +1,8 @@ --TEST-- Bug #37360 (gdimagecreatefromgif, bad image sizes) --SKIPIF-- -<?php - if (!extension_loaded('gd')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); +<?php + if (!extension_loaded('gd')) die("skip gd extension not available\n"); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug39286.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/gd/tests/bug39286.phpt diff -u php-src/ext/gd/tests/bug39286.phpt:1.1.2.1 php-src/ext/gd/tests/bug39286.phpt:1.1.2.2 --- php-src/ext/gd/tests/bug39286.phpt:1.1.2.1 Sun Dec 10 02:55:30 2006 +++ php-src/ext/gd/tests/bug39286.phpt Sat Jun 2 15:35:34 2007 @@ -1,9 +1,8 @@ --TEST-- Bug #39508 (imagefill crashes with small images 3 pixels or less) --SKIPIF-- -<?php - if (!extension_loaded('gd')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); +<?php + if (!extension_loaded('gd')) die("skip gd extension not available\n"); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug39366.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/gd/tests/bug39366.phpt diff -u php-src/ext/gd/tests/bug39366.phpt:1.1.2.2 php-src/ext/gd/tests/bug39366.phpt:1.1.2.3 --- php-src/ext/gd/tests/bug39366.phpt:1.1.2.2 Sat Nov 4 03:15:31 2006 +++ php-src/ext/gd/tests/bug39366.phpt Sat Jun 2 15:35:34 2007 @@ -1,9 +1,9 @@ --TEST-- Bug #39366 (imagerotate does not respect alpha with angles>45) --SKIPIF-- -<?php - if (!extension_loaded('gd')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); +<?php + if (!extension_loaded('gd')) die("skip gd extension not available\n"); + if (!function_exists("imagerotate")) die("skip requires bundled GD library\n"); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug39508.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/gd/tests/bug39508.phpt diff -u php-src/ext/gd/tests/bug39508.phpt:1.1.2.1 php-src/ext/gd/tests/bug39508.phpt:1.1.2.2 --- php-src/ext/gd/tests/bug39508.phpt:1.1.2.1 Sun Dec 10 01:58:50 2006 +++ php-src/ext/gd/tests/bug39508.phpt Sat Jun 2 15:35:34 2007 @@ -1,9 +1,8 @@ --TEST-- Bug #39508 (imagefill crashes with small images 3 pixels or less) --SKIPIF-- -<?php - if (!extension_loaded('gd')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); +<?php + if (!extension_loaded('gd')) die("skip gd extension not available\n"); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug39780.phpt?r1=1.1.2.4&r2=1.1.2.5&diff_format=u Index: php-src/ext/gd/tests/bug39780.phpt diff -u php-src/ext/gd/tests/bug39780.phpt:1.1.2.4 php-src/ext/gd/tests/bug39780.phpt:1.1.2.5 --- php-src/ext/gd/tests/bug39780.phpt:1.1.2.4 Thu May 17 11:43:47 2007 +++ php-src/ext/gd/tests/bug39780.phpt Sat Jun 2 15:35:34 2007 @@ -1,9 +1,9 @@ --TEST-- Bug #39780 (PNG image with CRC/data error raises a fatal error) --SKIPIF-- -<?php - if (!extension_loaded('gd')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); +<?php + if (!extension_loaded('gd')) die("skip gd extension not available\n"); + if (!GD_BUNDLED) die("skip requires bundled GD library\n"); ?> --FILE-- <?php @@ -17,5 +17,5 @@ Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition in %s on line %d -Warning: imagecreatefrompng(): '%sbug39780.png' is not a valid PNG file in %s on line %d +Warning: imagecreatefrompng(): '%s' is not a valid PNG file in %s on line %d bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/createfromgd2.phpt?r1=1.2.2.2&r2=1.2.2.3&diff_format=u Index: php-src/ext/gd/tests/createfromgd2.phpt diff -u php-src/ext/gd/tests/createfromgd2.phpt:1.2.2.2 php-src/ext/gd/tests/createfromgd2.phpt:1.2.2.3 --- php-src/ext/gd/tests/createfromgd2.phpt:1.2.2.2 Mon Jul 17 12:54:09 2006 +++ php-src/ext/gd/tests/createfromgd2.phpt Sat Jun 2 15:35:34 2007 @@ -3,7 +3,6 @@ --SKIPIF-- <?php if (!function_exists('imagecreatefromgd2')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/createfromwbmp.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/gd/tests/createfromwbmp.phpt diff -u php-src/ext/gd/tests/createfromwbmp.phpt:1.1.2.2 php-src/ext/gd/tests/createfromwbmp.phpt:1.1.2.3 --- php-src/ext/gd/tests/createfromwbmp.phpt:1.1.2.2 Mon Jul 17 12:54:09 2006 +++ php-src/ext/gd/tests/createfromwbmp.phpt Sat Jun 2 15:35:34 2007 @@ -3,7 +3,6 @@ --SKIPIF-- <?php if (!function_exists('imagecreatefromwbmp')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/createfromwbmp2.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/gd/tests/createfromwbmp2.phpt diff -u php-src/ext/gd/tests/createfromwbmp2.phpt:1.1.2.2 php-src/ext/gd/tests/createfromwbmp2.phpt:1.1.2.3 --- php-src/ext/gd/tests/createfromwbmp2.phpt:1.1.2.2 Sat Mar 10 12:18:36 2007 +++ php-src/ext/gd/tests/createfromwbmp2.phpt Sat Jun 2 15:35:34 2007 @@ -3,6 +3,7 @@ --SKIPIF-- <?php if (!function_exists('imagecreatefromwbmp')) die("skip gd extension not available\n"); + if (!GD_BUNDLED) die("skip requires bundled GD library\n"); ?> --FILE-- <?php @@ -44,4 +45,4 @@ Warning: imagecreatefromwbmp(): gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully in %s on line %d -Warning: imagecreatefromwbmp(): '%s' is not a valid WBMP file in %s on line %d +Warning: imagecreatefromwbmp(): '%s' is not a valid WBMP file in %s on line %d http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gif2gd.phpt?r1=1.2&r2=1.2.4.1&diff_format=u Index: php-src/ext/gd/tests/gif2gd.phpt diff -u php-src/ext/gd/tests/gif2gd.phpt:1.2 php-src/ext/gd/tests/gif2gd.phpt:1.2.4.1 --- php-src/ext/gd/tests/gif2gd.phpt:1.2 Thu Dec 16 12:34:27 2004 +++ php-src/ext/gd/tests/gif2gd.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,11 @@ --TEST-- gif --> gd1/gd2 conversion test --SKIPIF-- -<?php +<?php if (!extension_loaded('gd')) { die("skip gd extension not available."); } - if (!GD_BUNDLED) { - die("skip external GD libraries always fail"); - } + if (!function_exists("imagecreatefromgif")) { die("skip gif read support unavailable"); } @@ -19,11 +17,11 @@ echo "GIF to GD1 conversion: "; echo imagegd(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test.gd1") ? 'ok' : 'failed'; echo "\n"; - + echo "GIF to GD2 conversion: "; echo imagegd2(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test.gd2") ? 'ok' : 'failed'; echo "\n"; - + @unlink($cwd . "/test.gd1"); @unlink($cwd . "/test.gd2"); ?> http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gif2jpg.phpt?r1=1.2&r2=1.2.4.1&diff_format=u Index: php-src/ext/gd/tests/gif2jpg.phpt diff -u php-src/ext/gd/tests/gif2jpg.phpt:1.2 php-src/ext/gd/tests/gif2jpg.phpt:1.2.4.1 --- php-src/ext/gd/tests/gif2jpg.phpt:1.2 Thu Dec 16 12:34:27 2004 +++ php-src/ext/gd/tests/gif2jpg.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,11 @@ --TEST-- gif --> jpeg conversion test --SKIPIF-- -<?php +<?php if (!extension_loaded('gd')) { die("skip gd extension not available."); } - if (!GD_BUNDLED) { - die("skip external GD libraries always fail"); - } + if (!function_exists("imagejpeg")) { die("skip jpeg support unavailable"); } @@ -22,7 +20,7 @@ echo "GIF to JPEG conversion: "; echo imagejpeg(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test_gif.jpeg") ? 'ok' : 'failed'; echo "\n"; - + @unlink($cwd . "/test_gif.jpeg"); ?> --EXPECT-- http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gif2png.phpt?r1=1.2&r2=1.2.4.1&diff_format=u Index: php-src/ext/gd/tests/gif2png.phpt diff -u php-src/ext/gd/tests/gif2png.phpt:1.2 php-src/ext/gd/tests/gif2png.phpt:1.2.4.1 --- php-src/ext/gd/tests/gif2png.phpt:1.2 Thu Dec 16 12:34:27 2004 +++ php-src/ext/gd/tests/gif2png.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,11 @@ --TEST-- gif --> png conversion test --SKIPIF-- -<?php +<?php if (!extension_loaded('gd')) { die("skip gd extension not available."); } - if (!GD_BUNDLED) { - die("skip external GD libraries always fail"); - } + if (!function_exists("imagepng")) { die("skip png support unavailable"); } @@ -22,7 +20,7 @@ echo "GIF to PNG conversion: "; echo imagepng(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test_gif.png") ? 'ok' : 'failed'; echo "\n"; - + @unlink($cwd . "/test_gif.png"); ?> --EXPECT-- http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagefilter.phpt?r1=1.4&r2=1.4.4.1&diff_format=u Index: php-src/ext/gd/tests/imagefilter.phpt diff -u php-src/ext/gd/tests/imagefilter.phpt:1.4 php-src/ext/gd/tests/imagefilter.phpt:1.4.4.1 --- php-src/ext/gd/tests/imagefilter.phpt:1.4 Thu Dec 16 12:34:27 2004 +++ php-src/ext/gd/tests/imagefilter.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,11 @@ --TEST-- imagefilter() function test --SKIPIF-- -<?php +<?php if (!extension_loaded('gd')) { die("skip gd extension not available."); } - if (!GD_BUNDLED) { - die("skip this test requires bundled gd library."); - } + if (!function_exists("imagefilter")) die("skip requires bundled GD library\n"); ?> --FILE-- <?php @@ -15,7 +13,7 @@ "IMG_FILTER_NEGATE", "IMG_FILTER_GRAYSCALE", "IMG_FILTER_EDGEDETECT", - "IMG_FILTER_GAUSSIAN_BLUR", + "IMG_FILTER_GAUSSIAN_BLUR", "IMG_FILTER_SELECTIVE_BLUR", "IMG_FILTER_EMBOSS", "IMG_FILTER_MEAN_REMOVAL" @@ -23,7 +21,7 @@ $SAVE_DIR = dirname(__FILE__); $SOURCE_IMG = $SAVE_DIR . "/test.png"; - + foreach ($no_arg_filters as $filt) { $im = imagecreatefrompng($SOURCE_IMG); if (imagefilter($im, constant($filt))) { @@ -33,10 +31,10 @@ } else { echo "$filt failed\n"; } - } + } $im = imagecreatefrompng($SOURCE_IMG); - + if (imagefilter($im, IMG_FILTER_SMOOTH, -1924.124)) { imagepng($im, $SAVE_DIR . "/IMG_FILTER_SMOOTH.png"); echo "IMG_FILTER_SMOOTH success\n"; @@ -44,9 +42,9 @@ } else { echo "IMG_FILTER_SMOOTH failed\n"; } - + $im = imagecreatefrompng($SOURCE_IMG); - + if (imagefilter($im, IMG_FILTER_COLORIZE, -127.12, -127.98, 127)) { imagepng($im, $SAVE_DIR . "/IMG_FILTER_COLORIZE.png"); echo "IMG_FILTER_COLORIZE success\n"; @@ -54,9 +52,9 @@ } else { echo "IMG_FILTER_COLORIZE failed\n"; } - + $im = imagecreatefrompng($SOURCE_IMG); - + if (imagefilter($im, IMG_FILTER_CONTRAST, -90)) { imagepng($im, $SAVE_DIR . "/IMG_FILTER_CONTRAST.png"); echo "IMG_FILTER_CONTRAST success\n"; @@ -66,7 +64,7 @@ } $im = imagecreatefrompng($SOURCE_IMG); - + if (imagefilter($im, IMG_FILTER_BRIGHTNESS, 98)) { imagepng($im, $SAVE_DIR . "/IMG_FILTER_BRIGHTNESS.png"); echo "IMG_FILTER_BRIGHTNESS success\n"; http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagewbmp.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/gd/tests/imagewbmp.phpt diff -u php-src/ext/gd/tests/imagewbmp.phpt:1.1.2.2 php-src/ext/gd/tests/imagewbmp.phpt:1.1.2.3 --- php-src/ext/gd/tests/imagewbmp.phpt:1.1.2.2 Mon Jul 17 12:54:09 2006 +++ php-src/ext/gd/tests/imagewbmp.phpt Sat Jun 2 15:35:34 2007 @@ -3,7 +3,6 @@ --SKIPIF-- <?php if (!function_exists('imagecreatefromwbmp')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/jpeg2png.phpt?r1=1.3&r2=1.3.4.1&diff_format=u Index: php-src/ext/gd/tests/jpeg2png.phpt diff -u php-src/ext/gd/tests/jpeg2png.phpt:1.3 php-src/ext/gd/tests/jpeg2png.phpt:1.3.4.1 --- php-src/ext/gd/tests/jpeg2png.phpt:1.3 Thu Dec 16 12:34:27 2004 +++ php-src/ext/gd/tests/jpeg2png.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,11 @@ --TEST-- jpeg <--> png conversion test --SKIPIF-- -<?php +<?php if (!extension_loaded('gd')) { die("skip gd extension not available."); } - if (!GD_BUNDLED) { - die("skip external GD libraries always fail"); - } + if (!function_exists("imagecreatefrompng") || !function_exists("imagepng")) { die("skip png support unavailable"); } @@ -22,19 +20,19 @@ echo "PNG to JPEG conversion: "; echo imagejpeg(imagecreatefrompng($cwd . "/conv_test.png"), $cwd . "/test_jpeg.jpeg") ? 'ok' : 'failed'; echo "\n"; - + echo "Generated JPEG to PNG conversion: "; echo imagepng(imagecreatefromjpeg($cwd . "/test_jpeg.jpeg"), $cwd . "/test_jpng.png") ? 'ok' : 'failed'; echo "\n"; - + echo "JPEG to PNG conversion: "; echo imagepng(imagecreatefromjpeg($cwd . "/conv_test.jpeg"), $cwd . "/test_png.png") ? 'ok' : 'failed'; echo "\n"; - + echo "Generated PNG to JPEG conversion: "; echo imagejpeg(imagecreatefrompng($cwd . "/test_png.png"), $cwd . "/test_pjpeg.jpeg") ? 'ok' : 'failed'; echo "\n"; - + @unlink($cwd . "/test_jpeg.jpeg"); @unlink($cwd . "/test_jpng.png"); @unlink($cwd . "/test_png.png"); http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/jpg2gd.phpt?r1=1.2&r2=1.2.4.1&diff_format=u Index: php-src/ext/gd/tests/jpg2gd.phpt diff -u php-src/ext/gd/tests/jpg2gd.phpt:1.2 php-src/ext/gd/tests/jpg2gd.phpt:1.2.4.1 --- php-src/ext/gd/tests/jpg2gd.phpt:1.2 Thu Dec 16 12:34:28 2004 +++ php-src/ext/gd/tests/jpg2gd.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,11 @@ --TEST-- jpeg <--> gd1/gd2 conversion test --SKIPIF-- -<?php +<?php if (!extension_loaded('gd')) { die("skip gd extension not available."); } - if (!GD_BUNDLED) { - die("skip external GD libraries always fail"); - } + if (!function_exists("imagecreatefromjpeg") || !function_exists("imagejpeg")) { die("skip jpeg support unavailable"); } @@ -19,19 +17,19 @@ echo "JPEG to GD1 conversion: "; echo imagegd(imagecreatefromjpeg($cwd . "/conv_test.jpeg"), $cwd . "/test.gd1") ? 'ok' : 'failed'; echo "\n"; - + echo "JPEG to GD2 conversion: "; echo imagegd2(imagecreatefromjpeg($cwd . "/conv_test.jpeg"), $cwd . "/test.gd2") ? 'ok' : 'failed'; echo "\n"; - + echo "GD1 to JPEG conversion: "; echo imagejpeg(imagecreatefromgd($cwd . "/test.gd1"), $cwd . "/test_gd1.jpeg") ? 'ok' : 'failed'; echo "\n"; - + echo "GD2 to JPEG conversion: "; echo imagejpeg(imagecreatefromgd2($cwd . "/test.gd2"), $cwd . "/test_gd2.jpeg") ? 'ok' : 'failed'; echo "\n"; - + @unlink($cwd . "/test.gd1"); @unlink($cwd . "/test.gd2"); @unlink($cwd . "/test_gd1.jpeg"); http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/libgd00086.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/gd/tests/libgd00086.phpt diff -u php-src/ext/gd/tests/libgd00086.phpt:1.1.2.3 php-src/ext/gd/tests/libgd00086.phpt:1.1.2.4 --- php-src/ext/gd/tests/libgd00086.phpt:1.1.2.3 Wed May 16 22:55:27 2007 +++ php-src/ext/gd/tests/libgd00086.phpt Sat Jun 2 15:35:34 2007 @@ -1,9 +1,9 @@ --TEST-- libgd #86 (Possible infinite loop in imagecreatefrompng) --SKIPIF-- -<?php - if (!extension_loaded('gd')) die("skip gd extension not available\n"); - if (!GD_BUNDLED) die('skip external GD libraries always fail'); +<?php + if (!extension_loaded('gd')) die("skip gd extension not available\n"); + if (!GD_BUNDLED) die("skip requires bundled GD library\n"); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/png2gd.phpt?r1=1.2&r2=1.2.4.1&diff_format=u Index: php-src/ext/gd/tests/png2gd.phpt diff -u php-src/ext/gd/tests/png2gd.phpt:1.2 php-src/ext/gd/tests/png2gd.phpt:1.2.4.1 --- php-src/ext/gd/tests/png2gd.phpt:1.2 Thu Dec 16 12:34:28 2004 +++ php-src/ext/gd/tests/png2gd.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,11 @@ --TEST-- png <--> gd1/gd2 conversion test --SKIPIF-- -<?php +<?php if (!extension_loaded('gd')) { die("skip gd extension not available."); } - if (!GD_BUNDLED) { - die("skip external GD libraries always fail"); - } + if (!function_exists("imagecreatefrompng") || !function_exists("imagepng")) { die("skip png support unavailable"); } @@ -19,19 +17,19 @@ echo "PNG to GD1 conversion: "; echo imagegd(imagecreatefrompng($cwd . "/conv_test.png"), $cwd . "/test.gd1") ? 'ok' : 'failed'; echo "\n"; - + echo "PNG to GD2 conversion: "; echo imagegd2(imagecreatefrompng($cwd . "/conv_test.png"), $cwd . "/test.gd2") ? 'ok' : 'failed'; echo "\n"; - + echo "GD1 to PNG conversion: "; echo imagepng(imagecreatefromgd($cwd . "/test.gd1"), $cwd . "/test_gd1.png") ? 'ok' : 'failed'; echo "\n"; - + echo "GD2 to PNG conversion: "; echo imagepng(imagecreatefromgd2($cwd . "/test.gd2"), $cwd . "/test_gd2.png") ? 'ok' : 'failed'; echo "\n"; - + @unlink($cwd . "/test.gd1"); @unlink($cwd . "/test.gd2"); @unlink($cwd . "/test_gd1.png"); http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/pngcomp.phpt?r1=1.1.2.2&r2=1.1.2.2.2.1&diff_format=u Index: php-src/ext/gd/tests/pngcomp.phpt diff -u php-src/ext/gd/tests/pngcomp.phpt:1.1.2.2 php-src/ext/gd/tests/pngcomp.phpt:1.1.2.2.2.1 --- php-src/ext/gd/tests/pngcomp.phpt:1.1.2.2 Fri Dec 9 18:17:02 2005 +++ php-src/ext/gd/tests/pngcomp.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,11 @@ --TEST-- png compression test --SKIPIF-- -<?php +<?php if (!extension_loaded('gd')) { die("skip gd extension not available."); } - if (!GD_BUNDLED) { - die("skip external GD libraries always fail"); - } + if (!function_exists("imagecreatefrompng") || !function_exists("imagepng")) { die("skip png support unavailable"); } @@ -27,7 +25,7 @@ if ($col == 0xffffff) { echo "ok\n"; } - + @unlink($cwd . "/test_pngcomp.png"); ?> --EXPECT-- http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/xpm2gd.phpt?r1=1.2&r2=1.2.4.1&diff_format=u Index: php-src/ext/gd/tests/xpm2gd.phpt diff -u php-src/ext/gd/tests/xpm2gd.phpt:1.2 php-src/ext/gd/tests/xpm2gd.phpt:1.2.4.1 --- php-src/ext/gd/tests/xpm2gd.phpt:1.2 Thu Dec 16 12:34:28 2004 +++ php-src/ext/gd/tests/xpm2gd.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,11 @@ --TEST-- xpm --> gd1/gd2 conversion test --SKIPIF-- -<?php +<?php if (!extension_loaded('gd')) { die("skip gd extension not available."); } - if (!GD_BUNDLED) { - die("skip external GD libraries always fail"); - } + if (!function_exists("imagecreatefromxpm")) { die("skip xpm read support unavailable"); } @@ -19,11 +17,11 @@ echo "XPM to GD1 conversion: "; echo imagegd(imagecreatefromxpm($cwd . "/conv_test.xpm"), $cwd . "/test.gd1") ? 'ok' : 'failed'; echo "\n"; - + echo "XPM to GD2 conversion: "; echo imagegd2(imagecreatefromxpm($cwd . "/conv_test.xpm"), $cwd . "/test.gd2") ? 'ok' : 'failed'; echo "\n"; - + @unlink($cwd . "/test.gd1"); @unlink($cwd . "/test.gd2"); ?> http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/xpm2jpg.phpt?r1=1.2&r2=1.2.4.1&diff_format=u Index: php-src/ext/gd/tests/xpm2jpg.phpt diff -u php-src/ext/gd/tests/xpm2jpg.phpt:1.2 php-src/ext/gd/tests/xpm2jpg.phpt:1.2.4.1 --- php-src/ext/gd/tests/xpm2jpg.phpt:1.2 Thu Dec 16 12:34:28 2004 +++ php-src/ext/gd/tests/xpm2jpg.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,11 @@ --TEST-- xpm --> jpeg conversion test --SKIPIF-- -<?php +<?php if (!extension_loaded('gd')) { die("skip gd extension not available."); } - if (!GD_BUNDLED) { - die("skip external GD libraries always fail"); - } + if (!function_exists("imagejpeg")) { die("skip jpeg support unavailable"); } @@ -22,7 +20,7 @@ echo "XPM to JPEG conversion: "; echo imagejpeg(imagecreatefromxpm($cwd . "/conv_test.xpm"), $cwd . "/test_xpm.jpeg") ? 'ok' : 'failed'; echo "\n"; - + @unlink($cwd . "/test_xpm.jpeg"); ?> --EXPECT-- http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/xpm2png.phpt?r1=1.2&r2=1.2.4.1&diff_format=u Index: php-src/ext/gd/tests/xpm2png.phpt diff -u php-src/ext/gd/tests/xpm2png.phpt:1.2 php-src/ext/gd/tests/xpm2png.phpt:1.2.4.1 --- php-src/ext/gd/tests/xpm2png.phpt:1.2 Thu Dec 16 12:34:28 2004 +++ php-src/ext/gd/tests/xpm2png.phpt Sat Jun 2 15:35:34 2007 @@ -1,13 +1,11 @@ --TEST-- xpm --> png conversion test --SKIPIF-- -<?php +<?php if (!extension_loaded('gd')) { die("skip gd extension not available."); } - if (!GD_BUNDLED) { - die("skip external GD libraries always fail"); - } + if (!function_exists("imagepng")) { die("skip png support unavailable"); } @@ -22,7 +20,7 @@ echo "XPM to PNG conversion: "; echo imagepng(imagecreatefromxpm($cwd . "/conv_test.xpm"), $cwd . "/test_xpm.png") ? 'ok' : 'failed'; echo "\n"; - + @unlink($cwd . "/test_xpm.png"); ?> --EXPECT-- http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug39780_extern.phpt?view=markup&rev=1.1 Index: php-src/ext/gd/tests/bug39780_extern.phpt +++ php-src/ext/gd/tests/bug39780_extern.phpt --TEST-- Bug #39780 (PNG image with CRC/data error raises a fatal error) --SKIPIF-- <?php if (!extension_loaded('gd')) die("skip gd extension not available\n"); if (GD_BUNDLED) die("skip requires extern GD\n"); ?> --FILE-- <?php $im = imagecreatefrompng(dirname(__FILE__) . '/bug39780.png'); var_dump($im); ?> --EXPECTF-- gd-png: fatal libpng error: Read Error: truncated data gd-png error: setjmp returns error condition 2 Warning: imagecreatefrompng(): '%sbug39780.png' is not a valid PNG file in /%s on line %d bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/createfromwbmp2_extern.phpt?view=markup&rev=1.1 Index: php-src/ext/gd/tests/createfromwbmp2_extern.phpt +++ php-src/ext/gd/tests/createfromwbmp2_extern.phpt --TEST-- imagecreatefromwbmp with invalid wbmp --SKIPIF-- <?php if (!function_exists('imagecreatefromwbmp')) die("skip gd extension not available\n"); if (GD_BUNDLED) die("skip requires extern GD\n"); ?> --FILE-- <?php $filename = dirname(__FILE__) . '/_tmp.wbmp'; $fp = fopen($filename,"wb"); if (!$fp) { exit("Failed to create <$filename>"); } //write header $c = 0; fputs($fp, chr($c), 1); fputs($fp, $c, 1); //write width = 2^32 / 4 + 1 $c = 0x84; fputs($fp, chr($c), 1); $c = 0x80; fputs($fp, chr($c), 1); fputs($fp, chr($c), 1); fputs($fp, chr($c), 1); $c = 0x01; fputs($fp, chr($c), 1); /*write height = 4*/ $c = 0x04; fputs($fp, chr($c), 1); /*write some data to cause overflow*/ for ($i=0; $i<10000; $i++) { fwrite($fp, chr($c), 1); } fclose($fp); $im = imagecreatefromwbmp($filename); unlink($filename); ?> --EXPECTF-- gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully Warning: imagecreatefromwbmp(): '%s_tmp.wbmp' is not a valid WBMP file in %s on line %d http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/libgd00086_extern.phpt?view=markup&rev=1.1 Index: php-src/ext/gd/tests/libgd00086_extern.phpt +++ php-src/ext/gd/tests/libgd00086_extern.phpt --TEST-- libgd #86 (Possible infinite loop in imagecreatefrompng) --SKIPIF-- <?php if (!extension_loaded('gd')) die("skip gd extension not available\n"); if (GD_BUNDLED) die("skip requires external GD library\n"); ?> --FILE-- <?php $im = imagecreatefrompng(dirname(__FILE__) . '/libgd00086.png'); var_dump($im); ?> --EXPECTF-- gd-png: fatal libpng error: Read Error: truncated data gd-png error: setjmp returns error condition 1 Warning: imagecreatefrompng(): '%slibgd00086.png' is not a valid PNG file in %s on line %d bool(false)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php