Files
php-src/ext/gd/tests/imagebmp_basic.phpt
Michael Orlitzky ac8248bb63 ext/gd: imagebmp_basic.phpt test require PNG support.
After c1c6520c4f, libgd needs PNG support to pass this test. Skip the
test if we are using (external) libgd without it.

close GH-22016
2026-05-11 20:21:44 +01:00

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.