📜  PHP | imagecreatefromwbmp()函数

📅  最后修改于: 2022-05-13 01:56:23.604000             🧑  作者: Mango

PHP | imagecreatefromwbmp()函数

imagecreatefromwbmp()函数是PHP中的一个内置函数,用于从 WBMP 文件或 URL 创建新图像。 WBMP(无线应用协议位图格式)是一种针对移动计算设备优化的单色图形文件格式。这个加载的图像可以在程序中进一步处理。当您想在从 WBMP 文件加载图像后对其进行编辑时,通常会使用此函数。可以使用imagewbmp()函数将图像转换为 WBMP。

句法:

resource imagecreatefromwbmp( string $filename )

参数:此函数接受单个参数$filename ,其中包含图像的名称。

返回值:此函数成功时返回图像资源标识符,错误时返回 FALSE。

下面的示例说明了PHP中的imagecreatefromwbmp()函数

示例 1:


输出:

This will load the content into browser in the form 
of unsupported text as browsers don't support WBMP.

示例 2:


输出:

参考: https://www. PHP.net/manual/en/函数.imagecreatefromwbmp。 PHP