public function getPixel($x, $y)
    {
        $index = imagecolorat($this->res, $x, $y);
        return imagecolorsforindex($this->res, $index);
    }
public function getPixel($x, $y)
    {
        $index = imagecolorat($this->res, $x, $y);
        return imagecolorsforindex($this->res, $index);
    }
public function getPixel ( $ x , $ y ) { $ index = imagecolorat ( $ this -> res , $ x , $ y ) ; return imagecolorsforindex ( $ this -> res , $ index ) ; }
Obtains the pixel components at the given coordinates.

The return value is an associative array with keys 'red', 'green', 'blue'
and 'alpha'. All of them are in the range 0 - 255 (inclusive) except for
'alpha' which is in the range 0 - 127.

@param int $x The pixel's x coordinate.
@param int $y The pixel's y coordinate.

@return int[] The pixel values.
Obtains the pixel components at the given coordinates .