mirror of
https://github.com/php/php-src.git
synced 2026-10-28 17:56:50 +08:00
After c1c6520c4f, libgd needs PNG support to pass this test. Skip the
test if we are using (external) libgd without it.
close GH-22016
24 lines
502 B
PHP
24 lines
502 B
PHP
--TEST--
|
|
imagebmp() - basic functionality
|
|
--EXTENSIONS--
|
|
gd
|
|
--SKIPIF--
|
|
<?php
|
|
if (!(imagetypes() & IMG_PNG)) {
|
|
die("skip No PNG support");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
// create an image
|
|
$im = imagecreate(100, 100);
|
|
imagecolorallocate($im, 0, 0, 0);
|
|
$white = imagecolorallocate($im, 255, 255, 255);
|
|
imageline($im, 10,10, 89,89, $white);
|
|
imagepalettetotruecolor($im);
|
|
require __DIR__ . "/func.inc";
|
|
test_image_equals_file(__DIR__ . "/imagebmp_basic.png", $im);
|
|
?>
|
|
--EXPECT--
|
|
The images are equal.
|