“Php image2wbmp”的版本间差异
本页内容
(创建页面,内容为“{{DISPLAYTITLE:image_type_to_mime_type()}}5 = PHP image2wbmp - 输出WBMP图片 = PHP 图像处理 image2wbmp — 以 WBMP 格式将图像输出到浏览器或文件。 === 语法 === <sample title="" desc="" lang="php" hererun="1"> int image2wbmp ( resource $image [, string $filename [, int $threshold ]] ) </sample> image2wbmp() 从 image 图像创建一个名为 filename 的 WBMP 文件。image 参数是某个…”) |
无编辑摘要 |
||
第1行: | 第1行: | ||
{{DISPLAYTITLE: | {{DISPLAYTITLE:image2wbmp()}}[[Category:PHP GD 图形处理函数参考手册|6]] | ||
= PHP image2wbmp - 输出WBMP图片 = | = PHP image2wbmp - 输出WBMP图片 = | ||
2022年8月17日 (三) 22:31的最新版本
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); // 直接将原图像流输出
?>