Esempio n. 1
0
 /**
  * Get the index of the color of a pixel.
  *
  * @param int $x
  * @param int $y
  *
  * @return int
  */
 public function imageColorAt($x = 0, $y = 0)
 {
     $color = imagecolorat($this->image, $x, $y);
     if (!$this->imageIsTrueColor()) {
         $arrColor = imagecolorsforindex($this->image, $color);
         return Color::arrayColorToIntColor($arrColor);
     } else {
         return $color;
     }
 }