位置: 编程技术 - 正文

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

编辑:rootadmin
imageistruecolor

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

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

(PHP 4 >= 4.3.2, PHP 5)

imageistruecolor — 检查图像是否为真彩色图像

说明 bool imageistruecolor ( resource $image )

imageistruecolor() 检查 image 图像是否为真彩色图像。

参数

imagePHP:imageistruecolor()的用法_GD库图像处理函数

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

返回值

如果 image 是真彩色图像返回 TRUE,否则返回 FALSE。

范例

Example #1 Simple detection of true color image instances using imageistruecolor()

<?php//$imisanimageinstance//Checkifimageisatruecolorimageornotif(!imageistruecolor($im)){//Createanewtruecolorimageinstance$tc=imagecreatetruecolor(imagesx($im),imagesy($im));imagecopy($tc,$im,0,0,0,0,imagesx($im),imagesy($im));imagedestroy($im);$im=$tc;$tc=NULL;}//Continueworkingwithimageinstance?>

注释

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

参见

imagecreatetruecolor() - 新建一个真彩色图像

PHP:imageinterlace()的用法_GD库图像处理函数 imageinterlace(PHP4,PHP5)imageinterlace激活或禁止隔行扫描说明intimageinterlace(resource$image[,int$interlace])imageinterlace()打开或关闭隔行扫描的比特标记。如果interlace为

PHP:imagegif()的用法_GD库图像处理函数 imagegif(PHP4,PHP5)imagegif输出图象到浏览器或文件。说明boolimagegif(resource$image[,string$filename])imagegif()从image图像以filename为文件名创建一个GIF图像。image参数是

PHP:imagefttext()的用法_GD库图像处理函数 imagefttext(PHP4=4.0.7,PHP5)imagefttext使用FreeType2字体将文本写入图像说明arrayimagefttext(resource$image,float$size,float$angle,int$x,int$y,int$color,string$fontfile,string$text[,array$e

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

上一篇:PHP:imagejpeg()的用法_GD库图像处理函数(php中imagestring)

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

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

鄂ICP备2023003026号

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

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