xref: /PHP-7.4/ext/gd/tests/bug77943.phpt (revision 3891e0d1)
1--TEST--
2Bug #77943 (imageantialias($image, false); does not work)
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip gd extension not available');
6?>
7--FILE--
8<?php
9require_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
17imageantialias($im, false);
18imagefilledrectangle($im, 0, 0, $width-1, $height-1, $white);
19
20imageline($im, 0, 0, $width, $height, $blue);
21imagesetthickness($im, 3);
22imageline($im, 10, 0, $width, $height-10, $blue);
23
24test_image_equals_file(__DIR__ . '/bug77943.png', $im);
25?>
26===DONE===
27--EXPECT--
28The images are equal.
29===DONE===
30