image2wbmp
(PHP 4 >= 4.0.5, PHP 5, PHP 7)
image2wbmp — 以 WBMP 格式將影象輸出到瀏覽器或檔案
說明
     image2wbmp(resource 
   $image, string $filename = ?, int $threshold = ?): int
    image2wbmp() 從
    image 影象建立一個名為 filename 的
    WBMP 檔案。image
    參數是某個影象建立函式的返回值,例如 imagecreatetruecolor()。
   
    filename 參數是可選項,如果省略,則直接將原影象流輸出。通過用
    header() 發送 image/vnd.wap.wbmp
    的 Content-type,可以建立直接輸出 WBMP 影象的 PHP 指令碼。
   
示例 #1 image2wbmp() 例子
<?php
$file = 'php.jpg';
$image = imagecreatefrompng($file);
header('Content-type: ' . image_type_to_mime(IMAGETYPE_WBMP));
image2wbmp($file); // output the stream directly
?>
注意:
WBMP 支援僅在 PHP 編譯時加入了 GD-1.8 或更高版本時可用。
參見 imagewbmp()。