PHP image2wbmp - WBMP画像を出力
image2wbmp — 画像をWBMP形式でブラウザまたはファイルに出力する。
構文
int image2wbmp ( resource $image [, string $filename [, int $threshold ]] )
image2wbmp() は、image 画像から filename という名前のWBMPファイルを作成します。image パラメータは、imagecreatetruecolor() などの画像作成関数の戻り値です。
filename パラメータはオプションで、省略した場合は、元の画像ストリームを直接出力します。
例
<?php
$file = 'php.jpg';
$image = imagecreatefrompng($file);
header('Content-type: ' . image_type_to_mime(IMAGETYPE_WBMP));
image2wbmp($file); // 直接将原图像流输出
?>
その他の拡張機能
PHP 画像処理