]> granicus.if.org Git - php/commitdiff
- tests for imagecreatefromgd2 and gd2part
authorPierre Joye <pajoye@php.net>
Wed, 14 Dec 2005 19:00:28 +0000 (19:00 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 14 Dec 2005 19:00:28 +0000 (19:00 +0000)
ext/gd/tests/createfromgd2.phpt [new file with mode: 0644]
ext/gd/tests/src.gd2 [new file with mode: 0644]

diff --git a/ext/gd/tests/createfromgd2.phpt b/ext/gd/tests/createfromgd2.phpt
new file mode 100644 (file)
index 0000000..47740ae
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+Bug #27582 (ImageFillToBorder() on alphablending image looses alpha on fill color)
+--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
+$file = dirname(__FILE__) . '/src.gd2';
+
+$im2 = imagecreatefromgd2($file);
+echo 'test create from gd2: ';
+echo imagecolorat($im2, 4,4) == 0xffffff ? 'ok' : 'failed';
+echo "\n";
+
+$im3 = imagecreatefromgd2part($file, 4,4, 2,2);
+echo 'test create from gd2 part: ';
+echo imagecolorat($im2, 4,4) == 0xffffff ? 'ok' : 'failed';
+echo "\n";
+?>
+--EXPECT--
+test create from gd2: ok
+test create from gd2 part: ok
diff --git a/ext/gd/tests/src.gd2 b/ext/gd/tests/src.gd2
new file mode 100644 (file)
index 0000000..1c64b46
Binary files /dev/null and b/ext/gd/tests/src.gd2 differ