/** * Returns the color at the specified location of the image resource * * @param ImageResource $aResource * @param Coordinate $aCoordinate * * @return IColor The color found at the coordinates */ public static function getColorAt(ImageResource $aResource, Coordinate $aCoordinate) { $index = imagecolorat($aResource->getResource(), $aCoordinate->getX(), $aCoordinate->getY()); $color = new Color($index); return $color; }