public function grayscale()
    {
        $gray = min(
                255
                , round(
                        0.299 * $this->getRed() +
                        0.587 * $this->getGreen() +
                        0.114 * $this->getBlue()
                )
        );

        return $this->setFromArray(array(
                    $gray, $gray, $gray, $this->getAlpha()
        ));
    }