PHP image2wbmp - 输出WBMP图片

PHP 教程 · 2019-01-31 07:29:24

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 教程 文章: https://www.codercto.com/courses/l/5.html

查看所有标签

Functional Programming in Scala

Functional Programming in Scala

Paul Chiusano、Rúnar Bjarnason / Softbound print / 2014-9-14 / USD 44.99

Functional programming (FP) is a programming style emphasizing functions that return consistent and predictable results regardless of a program's state. As a result, functional code is easier to test ......一起来看看 《Functional Programming in Scala》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

SHA 加密
SHA 加密

SHA 加密工具