summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2019-04-29 16:29:08 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2019-04-29 16:29:08 +0200
commit3891e0d13a0e85e51a450a868960e98b5c74df56 (patch)
treebb1c050d868a7980780d5f62f30b9b6f6206edc8
parent5da0579259aab958093ca473cb2cc9dff9fd7813 (diff)
downloadphp-git-3891e0d13a0e85e51a450a868960e98b5c74df56.tar.gz
Add tests for bug77943
-rw-r--r--ext/gd/tests/bug77943.phpt29
-rw-r--r--ext/gd/tests/bug77943.pngbin0 -> 2194 bytes
2 files changed, 29 insertions, 0 deletions
diff --git a/ext/gd/tests/bug77943.phpt b/ext/gd/tests/bug77943.phpt
new file mode 100644
index 0000000000..1009b3e4b3
--- /dev/null
+++ b/ext/gd/tests/bug77943.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #77943 (imageantialias($image, false); does not work)
+--SKIPIF--
+<?php
+if (!extension_loaded('gd')) die('skip gd extension not available');
+?>
+--FILE--
+<?php
+require_once __DIR__ . '/func.inc';
+
+$width = 400;
+$height = 300;
+$im = imagecreatetruecolor($width, $height);
+$white = imagecolorallocate($im, 255, 255, 255);
+$blue = imagecolorallocate($im, 0, 0, 255);
+
+imageantialias($im, false);
+imagefilledrectangle($im, 0, 0, $width-1, $height-1, $white);
+
+imageline($im, 0, 0, $width, $height, $blue);
+imagesetthickness($im, 3);
+imageline($im, 10, 0, $width, $height-10, $blue);
+
+test_image_equals_file(__DIR__ . '/bug77943.png', $im);
+?>
+===DONE===
+--EXPECT--
+The images are equal.
+===DONE===
diff --git a/ext/gd/tests/bug77943.png b/ext/gd/tests/bug77943.png
new file mode 100644
index 0000000000..6eae56c05d
--- /dev/null
+++ b/ext/gd/tests/bug77943.png
Binary files differ