mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
- Three of our gd tests could be skipped with a message about requiring
bundled GD, but those tests don't actually require bundled GD. We
update the messages to mention the specific functions that are
required.
- add SKIPIF stanzas for missing PNG support
The bundled libgd always has PNG support, but an external one may not.
- imagerotate() is always available
Following 59ec80c5, the imagerotate() function is always available. We
may therefore remove its function_exists() checks without harm.
close GH-17894
32 lines
699 B
PHP
32 lines
699 B
PHP
--TEST--
|
|
Bug #77943 (imageantialias($image, false); does not work)
|
|
--EXTENSIONS--
|
|
gd
|
|
--SKIPIF--
|
|
<?php
|
|
if (!(imagetypes() & IMG_PNG)) {
|
|
die("skip No PNG support");
|
|
}
|
|
?>
|
|
--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);
|
|
?>
|
|
--EXPECT--
|
|
The images are equal.
|