cvs: 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 bug39780_extern.phpt
createfromgd2.phpt createfromwbmp.phpt createfromwbmp2_extern.phpt dashedlines.phpt gif2gd.phpt gif2jpg.phpt gif2png.phpt imagefilter.phpt
imagewbmp.phpt jpeg2png.phpt jpg2gd.phpt libgd00086.phpt libgd00086_extern.phpt png2gd.phpt pngcomp.phpt xpm2gd.phpt xpm2jpg.phpt xpm2png.phpt

From: Date: Mon, 28 May 2007 17:57:21 +0000
Subject: cvs: 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 bug39780_extern.phpt
createfromgd2.phpt createfromwbmp.phpt createfromwbmp2_extern.phpt dashedlines.phpt gif2gd.phpt gif2jpg.phpt gif2png.phpt imagefilter.phpt
imagewbmp.phpt jpeg2png.phpt jpg2gd.phpt libgd00086.phpt libgd00086_extern.phpt png2gd.phpt pngcomp.phpt xpm2gd.phpt xpm2jpg.phpt xpm2png.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-44525@lists.php.net to get a copy of this message
pajoye Mon May 28 17:57:21 2007 UTC Added files: /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 dashedlines.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. NB: if you use Debian, you'll realize how bad their package is and start to either use the source or push all patches I posted to their bugs tracker

http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug19366.phpt?r1=1.4&r2=1.5&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.5 --- php-src/ext/gd/tests/bug19366.phpt:1.4 Sun Apr 3 11:17:54 2005 +++ php-src/ext/gd/tests/bug19366.phpt Mon May 28 17:57:20 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/bug22544.phpt?r1=1.2&r2=1.3&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.3 --- php-src/ext/gd/tests/bug22544.phpt:1.2 Thu Apr 8 08:39:41 2004 +++ php-src/ext/gd/tests/bug22544.phpt Mon May 28 17:57:20 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 http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug24155.phpt?r1=1.3&r2=1.4&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.4 --- php-src/ext/gd/tests/bug24155.phpt:1.3 Mon Apr 25 11:36:24 2005 +++ php-src/ext/gd/tests/bug24155.phpt Mon May 28 17:57:20 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.3&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.3 --- php-src/ext/gd/tests/bug24594.phpt:1.2 Wed Jul 23 00:17:29 2003 +++ php-src/ext/gd/tests/bug24594.phpt Mon May 28 17:57:20 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 http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug27582_1.phpt?r1=1.5&r2=1.6&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.6 --- 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 Mon May 28 17:57:20 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.3&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.3 --- php-src/ext/gd/tests/bug28147.phpt:1.2 Sun Apr 25 19:45:02 2004 +++ php-src/ext/gd/tests/bug28147.phpt Mon May 28 17:57:20 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 http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/bug36697.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/gd/tests/bug36697.phpt diff -u php-src/ext/gd/tests/bug36697.phpt:1.2 php-src/ext/gd/tests/bug36697.phpt:1.3 --- php-src/ext/gd/tests/bug36697.phpt:1.2 Tue Mar 14 03:46:59 2006 +++ php-src/ext/gd/tests/bug36697.phpt Mon May 28 17:57:20 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.2&r2=1.3&diff_format=u Index: php-src/ext/gd/tests/bug37346.phpt diff -u php-src/ext/gd/tests/bug37346.phpt:1.2 php-src/ext/gd/tests/bug37346.phpt:1.3 --- php-src/ext/gd/tests/bug37346.phpt:1.2 Sun May 7 17:21:11 2006 +++ php-src/ext/gd/tests/bug37346.phpt Mon May 28 17:57:20 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.2&r2=1.3&diff_format=u Index: php-src/ext/gd/tests/bug37360.phpt diff -u php-src/ext/gd/tests/bug37360.phpt:1.2 php-src/ext/gd/tests/bug37360.phpt:1.3 --- php-src/ext/gd/tests/bug37360.phpt:1.2 Wed Apr 4 01:54:34 2007 +++ php-src/ext/gd/tests/bug37360.phpt Mon May 28 17:57:20 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.2&r2=1.3&diff_format=u Index: php-src/ext/gd/tests/bug38112.phpt diff -u php-src/ext/gd/tests/bug38112.phpt:1.2 php-src/ext/gd/tests/bug38112.phpt:1.3 --- php-src/ext/gd/tests/bug38112.phpt:1.2 Mon Jul 17 15:08:46 2006 +++ php-src/ext/gd/tests/bug38112.phpt Mon May 28 17:57:20 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.2&r2=1.3&diff_format=u Index: php-src/ext/gd/tests/bug39082.phpt diff -u php-src/ext/gd/tests/bug39082.phpt:1.2 php-src/ext/gd/tests/bug39082.phpt:1.3 --- php-src/ext/gd/tests/bug39082.phpt:1.2 Sun Oct 8 17:42:55 2006 +++ php-src/ext/gd/tests/bug39082.phpt Mon May 28 17:57:20 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.2&r2=1.3&diff_format=u Index: php-src/ext/gd/tests/bug39273.phpt diff -u php-src/ext/gd/tests/bug39273.phpt:1.2 php-src/ext/gd/tests/bug39273.phpt:1.3 --- php-src/ext/gd/tests/bug39273.phpt:1.2 Sat Nov 4 02:23:45 2006 +++ php-src/ext/gd/tests/bug39273.phpt Mon May 28 17:57:20 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.2&r2=1.3&diff_format=u Index: php-src/ext/gd/tests/bug39286.phpt diff -u php-src/ext/gd/tests/bug39286.phpt:1.2 php-src/ext/gd/tests/bug39286.phpt:1.3 --- php-src/ext/gd/tests/bug39286.phpt:1.2 Sun Dec 10 03:03:48 2006 +++ php-src/ext/gd/tests/bug39286.phpt Mon May 28 17:57:20 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&r2=1.2&diff_format=u Index: php-src/ext/gd/tests/bug39366.phpt diff -u php-src/ext/gd/tests/bug39366.phpt:1.1 php-src/ext/gd/tests/bug39366.phpt:1.2 --- php-src/ext/gd/tests/bug39366.phpt:1.1 Sat Nov 4 03:12:36 2006 +++ php-src/ext/gd/tests/bug39366.phpt Mon May 28 17:57:20 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.2&r2=1.3&diff_format=u Index: php-src/ext/gd/tests/bug39508.phpt diff -u php-src/ext/gd/tests/bug39508.phpt:1.2 php-src/ext/gd/tests/bug39508.phpt:1.3 --- php-src/ext/gd/tests/bug39508.phpt:1.2 Sun Dec 10 02:08:07 2006 +++ php-src/ext/gd/tests/bug39508.phpt Mon May 28 17:57:20 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.2&r2=1.3&diff_format=u Index: php-src/ext/gd/tests/bug39780.phpt diff -u php-src/ext/gd/tests/bug39780.phpt:1.2 php-src/ext/gd/tests/bug39780.phpt:1.3 --- php-src/ext/gd/tests/bug39780.phpt:1.2 Tue May 22 09:45:12 2007 +++ php-src/ext/gd/tests/bug39780.phpt Mon May 28 17:57:20 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 @@ -12,6 +12,7 @@ var_dump($im); ?> --EXPECTF-- + Warning: imagecreatefrompng(): gd-png: fatal libpng error: Read Error: truncated data in %s on line %d Warning: imagecreatefrompng(): gd-png error: setjmp returns error condition in %s on line %d http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/createfromgd2.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/gd/tests/createfromgd2.phpt diff -u php-src/ext/gd/tests/createfromgd2.phpt:1.2 php-src/ext/gd/tests/createfromgd2.phpt:1.3 --- php-src/ext/gd/tests/createfromgd2.phpt:1.2 Wed Dec 14 19:50:42 2005 +++ php-src/ext/gd/tests/createfromgd2.phpt Mon May 28 17:57:20 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&r2=1.2&diff_format=u Index: php-src/ext/gd/tests/createfromwbmp.phpt diff -u php-src/ext/gd/tests/createfromwbmp.phpt:1.1 php-src/ext/gd/tests/createfromwbmp.phpt:1.2 --- php-src/ext/gd/tests/createfromwbmp.phpt:1.1 Wed Dec 14 22:33:34 2005 +++ php-src/ext/gd/tests/createfromwbmp.phpt Mon May 28 17:57:20 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/dashedlines.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/gd/tests/dashedlines.phpt diff -u php-src/ext/gd/tests/dashedlines.phpt:1.3 php-src/ext/gd/tests/dashedlines.phpt:1.4 --- php-src/ext/gd/tests/dashedlines.phpt:1.3 Wed Aug 23 12:00:05 2006 +++ php-src/ext/gd/tests/dashedlines.phpt Mon May 28 17:57:20 2007 @@ -30,7 +30,6 @@ } imagedestroy($im); - $im = imagecreatetruecolor(6,6); imagefill($im, 0,0, 0xffffff); http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gif2gd.phpt?r1=1.2&r2=1.3&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.3 --- php-src/ext/gd/tests/gif2gd.phpt:1.2 Thu Dec 16 12:34:27 2004 +++ php-src/ext/gd/tests/gif2gd.phpt Mon May 28 17:57:20 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"); } http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gif2jpg.phpt?r1=1.2&r2=1.3&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.3 --- php-src/ext/gd/tests/gif2jpg.phpt:1.2 Thu Dec 16 12:34:27 2004 +++ php-src/ext/gd/tests/gif2jpg.phpt Mon May 28 17:57:20 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"); } http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/gif2png.phpt?r1=1.2&r2=1.3&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.3 --- php-src/ext/gd/tests/gif2png.phpt:1.2 Thu Dec 16 12:34:27 2004 +++ php-src/ext/gd/tests/gif2png.phpt Mon May 28 17:57:20 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"); } http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagefilter.phpt?r1=1.4&r2=1.5&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.5 --- php-src/ext/gd/tests/imagefilter.phpt:1.4 Thu Dec 16 12:34:27 2004 +++ php-src/ext/gd/tests/imagefilter.phpt Mon May 28 17:57:20 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" @@ -33,7 +31,7 @@ } else { echo "$filt failed\n"; } - } + } $im = imagecreatefrompng($SOURCE_IMG); http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imagewbmp.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/gd/tests/imagewbmp.phpt diff -u php-src/ext/gd/tests/imagewbmp.phpt:1.1 php-src/ext/gd/tests/imagewbmp.phpt:1.2 --- php-src/ext/gd/tests/imagewbmp.phpt:1.1 Wed Dec 14 22:33:34 2005 +++ php-src/ext/gd/tests/imagewbmp.phpt Mon May 28 17:57:20 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.4&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.4 --- php-src/ext/gd/tests/jpeg2png.phpt:1.3 Thu Dec 16 12:34:27 2004 +++ php-src/ext/gd/tests/jpeg2png.phpt Mon May 28 17:57:20 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"); } http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/jpg2gd.phpt?r1=1.2&r2=1.3&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.3 --- php-src/ext/gd/tests/jpg2gd.phpt:1.2 Thu Dec 16 12:34:28 2004 +++ php-src/ext/gd/tests/jpg2gd.phpt Mon May 28 17:57:20 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"); } http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/libgd00086.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/gd/tests/libgd00086.phpt diff -u php-src/ext/gd/tests/libgd00086.phpt:1.2 php-src/ext/gd/tests/libgd00086.phpt:1.3 --- php-src/ext/gd/tests/libgd00086.phpt:1.2 Wed May 16 22:54:33 2007 +++ php-src/ext/gd/tests/libgd00086.phpt Mon May 28 17:57:20 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.3&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.3 --- php-src/ext/gd/tests/png2gd.phpt:1.2 Thu Dec 16 12:34:28 2004 +++ php-src/ext/gd/tests/png2gd.phpt Mon May 28 17:57:20 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"); } http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/pngcomp.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/gd/tests/pngcomp.phpt diff -u php-src/ext/gd/tests/pngcomp.phpt:1.3 php-src/ext/gd/tests/pngcomp.phpt:1.4 --- php-src/ext/gd/tests/pngcomp.phpt:1.3 Fri Dec 9 18:16:21 2005 +++ php-src/ext/gd/tests/pngcomp.phpt Mon May 28 17:57:20 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"); } http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/xpm2gd.phpt?r1=1.2&r2=1.3&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.3 --- php-src/ext/gd/tests/xpm2gd.phpt:1.2 Thu Dec 16 12:34:28 2004 +++ php-src/ext/gd/tests/xpm2gd.phpt Mon May 28 17:57:20 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"); } http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/xpm2jpg.phpt?r1=1.2&r2=1.3&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.3 --- php-src/ext/gd/tests/xpm2jpg.phpt:1.2 Thu Dec 16 12:34:28 2004 +++ php-src/ext/gd/tests/xpm2jpg.phpt Mon May 28 17:57:20 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"); } http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/xpm2png.phpt?r1=1.2&r2=1.3&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.3 --- php-src/ext/gd/tests/xpm2png.phpt:1.2 Thu Dec 16 12:34:28 2004 +++ php-src/ext/gd/tests/xpm2png.phpt Mon May 28 17:57:20 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"); } 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)
« previous php.cvs (#44525) next »