位置: 编程技术 - 正文

PHP:imagecreatefromgd2()的用法_GD库图像处理函数

编辑:rootadmin
imagecreatefromgd2

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

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

(PHP 4 >= 4.0.7, PHP 5)

imagecreatefromgd2 — 从 GD2 文件或 URL 新建一图像

说明 resource imagecreatefromgd2 ( string $filename )

从 GD2 文件或 URL 新建一图像。

Tip

如已启用fopen 包装器,在此函数中, URL 可作为文件名。关于如何指定文件名详见 fopen()。各种wapper 的不同功能请参见 支持的协议和封装协议,注意其用法及其可提供的预定义变量。

参数

filename PHP:imagecreatefromgd2()的用法_GD库图像处理函数

GD2 图像的路径。

返回值

成功后返回图象资源,失败后返回 FALSE 。

范例

Example #1 imagecreatefromgd2() 例子

<?php//加载gd2图像$im=imagecreatefromgd2('./test.gd2');//在图像上应用效果。//在这个例子中,如果版本为PHP5+则反转图像颜色if(function_exists('imagefilter')){imagefilter($im,IMG_FILTER_NEGATE);}//保存图像imagegd2($im,'./test_updated.gd2');imagedestroy($im);?>

注释

Note: 此函数需要 GD 2.0.1 或更高版本(推荐 2.0. 及更高版本)。

Warning

Windows 版本的 PHP 在 4.3.0版之前不支持通过此函数访问远程文件,即使已经启用 allow_url_fopen.

PHP:imagecolortransparent()的用法_GD库图像处理函数 imagecolortransparent(PHP4,PHP5)imagecolortransparent将某个颜色定义为透明色说明intimagecolortransparent(resource$image[,int$color])imagecolortransparent()将image图像中的透明色设

PHP:imagecopy()的用法_GD库图像处理函数 imagecopy(PHP4,PHP5)imagecopy拷贝图像的一部分说明boolimagecopy(resource$dst_im,resource$src_im,int$dst_x,int$dst_y,int$src_x,int$src_y,int$src_w,int$src_h)将src_im图像中坐标从src_x,

PHP:imagecopymerge()的用法_GD库图像处理函数 imagecopymerge(PHP4=4.0.1,PHP5)imagecopymerge拷贝并合并图像的一部分说明boolimagecopymerge(resource$dst_im,resource$src_im,int$dst_x,int$dst_y,int$src_x,int$src_y,int$src_w,int$src_h,int$p

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

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

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

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

鄂ICP备2023003026号

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

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