GD and Image 函数
PHP Manual

image2wbmp

(PHP 4 >= 4.0.5, PHP 5)

image2wbmp以 WBMP 格式将图像输出到浏览器或文件

说明

int image2wbmp ( resource $image [, string $filename [, int $threshold ]] )

image2wbmp()image 图像创建一个名为 filenameWBMP 文件。image 参数是某个图像创建函数的返回值,例如 imagecreatetruecolor()

filename 参数是可选项,如果省略,则直接将原图像流输出。通过用 header() 发送 image/vnd.wap.wbmp 的 Content-type,可以创建直接输出 WBMP 图像的 PHP 脚本。

Example #1 image2wbmp() 例子

<?php
$file 
'php.jpg';
$image imagecreatefrompng($file);
header('Content-type: ' image_type_to_mime(IMAGETYPE_WBMP));
image2wbmp($file); // output the stream directly
?>

Note:

WBMP 支持仅在 PHP 编译时加入了 GD-1.8 或更高版本时可用。

参见 imagewbmp()


GD and Image 函数
PHP Manual