Esempio n. 1
0
 public function calculatePixel(Pixel $pixel, Pixel $top)
 {
     $pixelHsl = $pixel->toHsl();
     $topHsl = $top->toHsl();
     $pixel->fromHsl($topHsl['h'], $pixelHsl['s'], $pixelHsl['l']);
     return $pixel;
 }
Esempio n. 2
0
 public function getPixel($x, $y)
 {
     $index = imagecolorat($this->image, $x, $y);
     $colors = imagecolorsforindex($this->image, $index);
     $pixel = new Pixel();
     $pixel->fromArray($colors);
     return $pixel;
 }
Esempio n. 3
0
 public function getPixel($x, $y)
 {
     $pixel = new Pixel();
     $pixel->fromArray($this->color);
     return $pixel;
 }