当前位置: 首页 > 图文教程 > 网络编程 > PHP > PHP开发技巧:PHP关于图像颜色的操作
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)
该函数能探测图像总共使用了多少种颜色
评论 (0) All