位置: 编程技术 - 正文
推荐整理分享PHP:imagecolormatch()的用法_GD库图像处理函数,希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!
(PHP 4 >= 4.3.0, PHP 5)
imagecolormatch — 使一个图像中调色板版本的颜色与真彩色版本更能匹配
说明 bool imagecolormatch ( resource $image1 , resource $image2 )使一个图像中调色板版本的颜色与真彩色版本更能匹配。
参数image1
真彩色图像连接资源。
image2必须是调色板图像,而且和 image1 的大小必须相同。
返回值成功时返回 TRUE, 或者在失败时返回 FALSE。
范例Example #1 imagecolormatch() 例子
<?php//Setupthetruecolorandpaletteimages$im1=imagecreatefrompng('./gdlogo.png');$im2=imagecreate(imagesx($im1),imagesy($im1));//Addsomecolorsto$im2$colors=Array();$colors[]=imagecolorallocate($im2,,,);$colors[]=imagecolorallocate($im2,,0,);$colors[]=imagecolorallocate($im2,,,);$colors[]=imagecolorallocate($im2,,,);//Matchthesecolorswiththetruecolorimageimagecolormatch($im1,$im2);//Freefrommemoryimagedestroy($im1);imagedestroy($im2);?> 注释Note: 此函数仅在与 GD 库捆绑编译的 PHP 版本中可用。
Note: 此函数需要 GD 2.0.1 或更高版本(推荐 2.0. 及更高版本)。
参见imagecreatetruecolor() - 新建一个真彩色图像
PHP:imagecolorexactalpha()的用法_GD库图像处理函数 imagecolorexactalpha(PHP4=4.0.6,PHP5)imagecolorexactalpha取得指定的颜色加透明度的索引值说明intimagecolorexactalpha(resource$image,int$red,int$green,int$blue,int$alpha)返回图像调
PHP:imagecolorexact()的用法_GD库图像处理函数 imagecolorexact(PHP4,PHP5)imagecolorexact取得指定颜色的索引值说明intimagecolorexact(resource$image,int$red,int$green,int$blue)返回图像调色板中指定颜色的索引值。如果颜
PHP:imagecolorat()的用法_GD库图像处理函数 imagecolorat(PHP4,PHP5)imagecolorat取得某像素的颜色索引值说明intimagecolorat(resource$image,int$x,int$y)返回image所指定的图形中指定位置像素的颜色索引值。如果PHP编
标签: PHP:imagecolormatch()的用法_GD库图像处理函数
本文链接地址:https://www.jiuchutong.com/biancheng/288379.html 转载请保留说明!友情链接: 武汉网站建设