
The imagecolorat() function gets the index of the color of the pixel.
Syntax
imagecolorat( $img, $x, $y )
Parameters
img: Create an image with imagecreatetruecolor() function.
x: The x-coordinate of the point.
-
y: The y-coordinate of the point.
立即学习“PHP免费学习笔记(深入)”;
SmartB2B行业电子商务下载SmartB2B 是一款基于PHP、MySQL、Smarty的B2B行业电子商务网站管理系统,系统提供了供求模型、企业模型、产品模型、人才招聘模型、资讯模型等模块,适用于想在行业里取得领先地位的企业快速假设B2B网站,可以运行于Linux与Windows等多重服务器环境,安装方便,使用灵活。 系统使用当前流行的PHP语言开发,以MySQL为数据库,采用B/S架构,MVC模式开发。融入了模型化、模板
Return
The imagecolorat() function returns the color index or FALSE on failure.
Example
The following is an example:
Live Demo
输出
以下是输出结果:
array(4) { ["red"]=> int(255) ["green"]=> int(255) ["blue"]=> int(255) ["alpha"]=> int(127) }










