Skip to content

Commit 3891e0d

Browse files
committed
Add tests for bug77943
1 parent 5da0579 commit 3891e0d

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

ext/gd/tests/bug77943.phpt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--TEST--
2+
Bug #77943 (imageantialias($image, false); does not work)
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('gd')) die('skip gd extension not available');
6+
?>
7+
--FILE--
8+
<?php
9+
require_once __DIR__ . '/func.inc';
10+
11+
$width = 400;
12+
$height = 300;
13+
$im = imagecreatetruecolor($width, $height);
14+
$white = imagecolorallocate($im, 255, 255, 255);
15+
$blue = imagecolorallocate($im, 0, 0, 255);
16+
17+
imageantialias($im, false);
18+
imagefilledrectangle($im, 0, 0, $width-1, $height-1, $white);
19+
20+
imageline($im, 0, 0, $width, $height, $blue);
21+
imagesetthickness($im, 3);
22+
imageline($im, 10, 0, $width, $height-10, $blue);
23+
24+
test_image_equals_file(__DIR__ . '/bug77943.png', $im);
25+
?>
26+
===DONE===
27+
--EXPECT--
28+
The images are equal.
29+
===DONE===

ext/gd/tests/bug77943.png

2.14 KB
Loading

0 commit comments

Comments
 (0)