mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Add tests for bug77943
This commit is contained in:
parent
5da0579259
commit
3891e0d13a
2 changed files with 29 additions and 0 deletions
29
ext/gd/tests/bug77943.phpt
Normal file
29
ext/gd/tests/bug77943.phpt
Normal file
|
@ -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===
|
BIN
ext/gd/tests/bug77943.png
Normal file
BIN
ext/gd/tests/bug77943.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Loading…
Add table
Add a link
Reference in a new issue