xref: /PHP-8.1/ext/gd/tests/imagewbmp-mb.phpt (revision a375d547)
1--TEST--
2imagewbmp
3--EXTENSIONS--
4gd
5--FILE--
6<?php
7$file = __DIR__ . '/im私はガラスを食べられます.wbmp';
8
9$im = imagecreatetruecolor(6,6);
10imagefill($im, 0,0, 0xffffff);
11imagesetpixel($im, 3,3, 0x0);
12imagewbmp($im, $file);
13
14$im2 = imagecreatefromwbmp($file);
15echo 'test create wbmp: ';
16$c = imagecolorsforindex($im2, imagecolorat($im2, 3,3));
17$failed = false;
18foreach ($c as $v) {
19    if ($v != 0) {
20        $failed = true;
21    }
22}
23echo !$failed ? 'ok' : 'failed';
24echo "\n";
25unlink($file);
26?>
27--EXPECT--
28test create wbmp: ok
29