source: src/router/php7/ext/gd/tests/imagewbmp-mb.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 3 months ago

update php

File size: 634 bytes
Line 
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
Note: See TracBrowser for help on using the repository browser.