public function getPixel($x, $y) { $pixel = parent::getPixel($x, $y); $color = 0.21 * $pixel->red + 0.71 * $pixel->green + 0.07000000000000001 * $pixel->blue; $pixel->setColor($color, $color, $color); return $pixel; }
public function getPixel($x, $y) { $pixel = parent::getPixel($x, $y); $color = (max($pixel->getColor()) + min($pixel->getColor())) / 2; $pixel->setColor($color, $color, $color); return $pixel; }
public function getPixel($x, $y) { $pixel = parent::getPixel($x, $y); $color = $pixel->getAverage(); $pixel->setColor($color, $color, $color); return $pixel; }
public function getPixel($x, $y) { $pixel = parent::getPixel($x, $y); if (!$this->percent || $pixel->getAverage() > 255 / (100 / $this->percent)) { $pixel->setColor(255, 255, 255); } else { $pixel->setColor(); } return $pixel; }
public function getPixel($x, $y) { $newX = $x - $this->x; $newY = $y - $this->y; if (-1 < $newX && $newX < $this->getWidth() && -1 < $newY && $newY < $this->getHeight()) { return parent::getPixel($newX, $newY); } else { $pixel = parent::getPixel($x, $y); $pixel->disable(); return $pixel; } }
public function getPixel($x, $y) { $pixel = parent::getPixel($x, $y); foreach ($this->lbms as $lbm) { if ($x >= $lbm->getWidth() || $y >= $lbm->getHeight()) { continue; } $top = $lbm->getPixel($x, $y); if ($top->isActive()) { return $this->blend->calculatePixel($top, $pixel); } } return $pixel; }
public function getPixel($x, $y) { $pixel = parent::getPixel($x, $y); foreach ($this->lbms as $lbm) { if ($x >= $lbm->getWidth() || $y >= $lbm->getHeight()) { continue; } $pixelDiff = $lbm->getPixel($x, $y); if (abs($pixel->red - $pixelDiff->red) < $this->difference && abs($pixel->green - $pixelDiff->green) < $this->difference && abs($pixel->blue - $pixelDiff->blue) < $this->difference) { $pixel->disable(); break; } } return $pixel; }
public function getHeight() { return parent::getWidth(); }
public function getPixel($x, $y) { $pixel = parent::getPixel($x, $y); $pixel->setColor(255 - $pixel->red, 255 - $pixel->green, 255 - $pixel->blue); return $pixel; }
public function getPixel($x, $y) { $pixel = parent::getPixel($x, $y); return $this->calculatePixel($pixel, $this->pixel); }
public function getPixel($x, $y) { return parent::getPixel($this->getWidth() - 1 - $x, $y); }
public function getPixel($x, $y) { return parent::getPixel($x, $this->getHeight() - 1 - $y); }