频道栏目
首页 > 资讯 > 图像编程 > 正文

PHP开发技巧:PHP关于图像色彩的把握

16-01-07        来源:[db:作者]  
收藏   我要投稿

1.imagecolorallocate
语法:int imagecolorallocate(int im,int red,int green,int blue)
该函数的功效是在im为表现的图像中设定RGB模式的色彩,返回值为一个标识,这个标识唯一断定了一个在im图像的色彩,只有应用改函数指定到特定图像中的色彩才干被该图像应用,一个图像中所有实用的色彩都必需用这样的方法来指定。而且一个图像不能应用另外一个图像中的色彩

2.imagecolortransparent
语法:int imagecolortransparent(int im[,int col])
该函数给图像指定透明的背风景,im为图像的标识,col为应用ImageColorAllocate函数给图像指定的色彩,返回值为新指定的透明色的标识

3.imagecolorat
语法: int imagecolorat(int im,int x,int y)
该函数可以取得图像中的点源素的色彩值。参数im为图形的标识,x和Y分辨为图像中的点所在的地位的横坐标和纵坐标

4.imagecolorclosest
语法:int imagecolorclosest(int im,int red,int green,int blue)
该函数可以盘算给定的图像中某点的色彩和哪个色彩的索引值最接近,参数im为图像的标识。

5.imagecoloeset
语法:bool imagecolorset(int im,int index,int red,int green,int blue)
该函数可以设定图像的色彩索引表中指定索引的色彩 。 index为指定的索引号

6.imagecolorsforindex
语法:array imagecolorsforindex(int im,int index)
该函数从图像的元素索引表中根据索引号取得指定的色彩

7.imagecolorstotal
语法:int imagecolorstotal(int im)
该函数能探测图像总共应用了多少种色彩

相关TAG标签
上一篇:php获取301跳转URL
下一篇:php的扩展和嵌入--php内部变量
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站