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