PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<image_type_to_mime_typeimagealphablending>
Last updated: Sat, 20 Oct 2007

image2wbmp

(PHP 4 >= 4.0.5, PHP 5)

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

说明

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

image2wbmp()image 图像创建一个名为 filenameWBMP 文件。image 参数是 imagecreate() 的返回值。

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

例子 1. image2wbmp() 例子

<?php

$file
= 'php.jpg';

header('Content-type: ' . image_type_to_mime(IMAGETYPE_WBMP));
image2wbmp($file); // output the stream directly

?>

注: WBMP 支持仅能用于 PHP 编译时加入了 GD-1.8 或更高版本时。

参见 imagewbmp()




<image_type_to_mime_typeimagealphablending>
 Last updated: Sat, 20 Oct 2007
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST