位置: 编程技术 - 正文

PHP:imagexbm()的用法_GD库图像处理函数(php imagettftext)

编辑:rootadmin
imagexbm

推荐整理分享PHP:imagexbm()的用法_GD库图像处理函数(php imagettftext),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:php imagecopymerge,php imagecopymerge,php imagefill,php imagecopymerge,php中imagecreatefromjpeg,php image,php imagefill,php image,内容如对您有帮助,希望把文章链接给更多的朋友!

(PHP 5)

imagexbm — 将 XBM 图像输出到浏览器或文件

说明 bool imagexbm ( resource $image , string $filename [, int $foreground ] )

将 XBM 图像 image 输出到浏览器或文件

参数

image

由图象创建函数(例如imagecreatetruecolor())返回的图象资源。

filename

文件保存的路径,如果未设置或为 NULL,将会直接输出原始图象流。

foreground PHP:imagexbm()的用法_GD库图像处理函数(php imagettftext)

你可以从 imagecolorallocate() 分配一个颜色,并设置为该前景色参数。 默认颜色是黑色。

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE。

范例

Example #1 保存一个 XBM 文件

<?php//创建空白图像并添加文字$im=imagecreatetruecolor(,);$text_color=imagecolorallocate($im,,,);imagestring($im,1,5,5,'ASimpleTextString',$text_color);//保存图像imagexbm($im,'simpletext.xbm');//释放内存imagedestroy($im);?>

Example #2 以不同前景色保存一个 XBM 文件

<?php//创建空白图像并添加文字$im=imagecreatetruecolor(,);$text_color=imagecolorallocate($im,,,);imagestring($im,1,5,5,'ASimpleTextString',$text_color);//设置替换的前景色$foreground_color=imagecolorallocate($im,,0,0);//保存图像imagexbm($im,NULL,$foreground_color);//释放内存imagedestroy($im);?>

注释

Note: 此函数仅在与 GD 库捆绑编译的 PHP 版本中可用。

PHP:imagewbmp()的用法_GD库图像处理函数 imagewbmp(PHP4=4.0.1,PHP5)imagewbmp以WBMP格式将图像输出到浏览器或文件说明boolimagewbmp(resource$image[,string$filename[,int$foreground]])imagewbmp()从image图像创建一个名为fil

PHP:imagewebp()的用法_GD库图像处理函数 imagewebp(PHP5=5.5.0)imagewebp将WebP格式的图像输出到浏览器或文件说明boolimagewebp(resource$image,string$filename)将image参数指定的图像以WebP格式输出到浏览器或者保

PHP:imagetypes()的用法_GD库图像处理函数 imagetypes(PHP4=4.0.2,PHP5)imagetypes返回当前PHP版本所支持的图像类型说明intimagetypes(void)本函数以比特字段方式返回与当前PHP版本关联的GD库所支持的图像格式

本文链接地址:https://www.jiuchutong.com/biancheng/284738.html 转载请保留说明!

上一篇:PHP:iptcparse()的用法_GD库图像处理函数(php i)

下一篇:PHP:imagewbmp()的用法_GD库图像处理函数(php imagestring)

免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络