PHP 图像处理

首页

PHP image2wbmp


PHP image2wbmp - 输出WBMP图片

 

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

语法

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

image2wbmp() 从 image 图像创建一个名为 filename 的 WBMP 文件。image 参数是某个创建图像函数的返回值,例如 imagecreatetruecolor()。

filename 参数是可选项,如果省略,则直接将原图像流输出。

实例

$file = 'logo.png';
$img = imagecreatefrompng($file);
header('Content-type: ' . image_type_to_extension(IMAGETYPE_WBMP));
image2wbmp($img,'test.png'); // 直接将原图像流输出

2023-08-08 更新 本文链接:https://upwqy.com/index.php/wiki/info/519.html



PHP image_type_to_extension PHP imageaffinematrixconcat