1--TEST-- 2imagewbmp 3--SKIPIF-- 4<?php 5 if (!function_exists('imagecreatefromwbmp')) die("skip gd extension not available\n"); 6?> 7--FILE-- 8<?php 9$file = dirname(__FILE__) . '/im.wbmp'; 10 11$im = imagecreatetruecolor(6,6); 12imagefill($im, 0,0, 0xffffff); 13imagesetpixel($im, 3,3, 0x0); 14imagewbmp($im, $file); 15 16$im2 = imagecreatefromwbmp($file); 17echo 'test create wbmp: '; 18$c = imagecolorsforindex($im2, imagecolorat($im2, 3,3)); 19$failed = false; 20foreach ($c as $v) { 21 if ($v != 0) { 22 $failed = true; 23 } 24} 25echo !$failed ? 'ok' : 'failed'; 26echo "\n"; 27unlink($file); 28?> 29--EXPECT-- 30test create wbmp: ok 31