downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

imageaffine> <image_type_to_mime_type
[edit] Last updated: Wed, 19 Jun 2013

view this page in

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()



add a note add a note User Contributed Notes image2wbmp - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites