public function contrast($amount) { // Create an image resource. $this->createResource(); imagefilter($this->resource, IMG_FILTER_CONTRAST, 0 - $amount); $this->output = $this->resource; return $this; }