mirror of
https://github.com/php/php-src.git
synced 2025-01-21 11:13:38 +08:00
8e664dd105
(2.0.34 or 2.0.35) work. NB: if you use Debian, you'll realize how bad their package is and start to either use the source or push all patches I posted to their bugs tracker
31 lines
598 B
PHP
31 lines
598 B
PHP
--TEST--
|
|
imagewbmp
|
|
--SKIPIF--
|
|
<?php
|
|
if (!function_exists('imagecreatefromwbmp')) die("skip gd extension not available\n");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$file = dirname(__FILE__) . '/im.wbmp';
|
|
|
|
$im = imagecreatetruecolor(6,6);
|
|
imagefill($im, 0,0, 0xffffff);
|
|
imagesetpixel($im, 3,3, 0x0);
|
|
imagewbmp($im, $file);
|
|
|
|
$im2 = imagecreatefromwbmp($file);
|
|
echo 'test create wbmp: ';
|
|
$c = imagecolorsforindex($im2, imagecolorat($im2, 3,3));
|
|
$failed = false;
|
|
foreach ($c as $v) {
|
|
if ($v != 0) {
|
|
$failed = true;
|
|
}
|
|
}
|
|
echo !$failed ? 'ok' : 'failed';
|
|
echo "\n";
|
|
unlink($file);
|
|
?>
|
|
--EXPECT--
|
|
test create wbmp: ok
|