imagecreatefromxbm
(PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8)
imagecreatefromxbm — 由文件或 URL 创建一个新图象。
说明
imagecreatefromxbm(string
$filename
): resourceimagecreatefromxbm() 返回一图像标识符,代表了从给定的文件名取得的图像。
小技巧
如已启用fopen 包装器,在此函数中, URL 可作为文件名。关于如何指定文件名详见 fopen()。各种 wapper 的不同功能请参见 支持的协议和封装协议,注意其用法及其可提供的预定义变量。
参数
-
filename
-
Path to the XBM image.
返回值
成功后返回图象对象,失败后返回 false
。
范例
示例 #1 Convert an XBM image to a png image using imagecreatefromxbm()
<?php
// Load the xbm file
$xbm = imagecreatefromxbm('./example.xbm');
// Convert it to a png file
imagepng($xbm, './example.png');
imagedestroy($xbm);
?>
注释

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/function.imagecreatefromxbm.php