位置: 编程技术 - 正文
推荐整理分享PHP:imagecolorexactalpha()的用法_GD库图像处理函数,希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!
(PHP 4 >= 4.0.6, PHP 5)
imagecolorexactalpha — 取得指定的颜色加透明度的索引值
说明 int imagecolorexactalpha ( resource $image , int $red , int $green , int $blue , int $alpha )返回图像调色板中指定颜色加透明度的索引值。
参数image
由图象创建函数(例如imagecreatetruecolor())返回的图象资源。
red红色成分的值。
green绿色成分的值。
blue蓝色成分的值。
alphaA value between 0 and . 0 indicates completely opaque while indicates completely transparent.
The colors parameters are integers between 0 and or hexadecimals between 0x and 0xFF. 返回值返回图像调色板中指定颜色加透明度的索引值。 如果颜色不在图像的调色板中,返回 -1。
范例Example #1 Get colors from the GD logo
<?php//Setupanimage$im=imagecreatefrompng('./gdlogo.png');$colors=Array();$colors[]=imagecolorexactalpha($im,,0,0,0);$colors[]=imagecolorexactalpha($im,0,0,0,);$colors[]=imagecolorexactalpha($im,,,,);$colors[]=imagecolorexactalpha($im,,,,);print_r($colors);//Freefrommemoryimagedestroy($im);?>以上例程的输出类似于:
注释Note: 此函数需要 GD 2.0.1 或更高版本(推荐 2.0. 及更高版本)。
参见imagecolorclosestalpha() - 取得与指定的颜色加透明度最接近的颜色
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:imagecolorclosesthwb()的用法_GD库图像处理函数 imagecolorclosesthwb(PHP4=4.0.1,PHP5)imagecolorclosesthwb取得与给定颜色最接近的色度的黑白色的索引说明intimagecolorclosesthwb(resource$image,int$red,int$green,int$blue)取得与
标签: PHP:imagecolorexactalpha()的用法_GD库图像处理函数
本文链接地址:https://www.jiuchutong.com/biancheng/288380.html 转载请保留说明!上一篇:PHP:imagecolormatch()的用法_GD库图像处理函数
友情链接: 武汉网站建设