public function blur($amount, $type = Gd::GAUSSIAN_BLUR)
{
// Create an image resource.
$this->createResource();
$blurType = $type == self::GAUSSIAN_BLUR ? IMG_FILTER_GAUSSIAN_BLUR : IMG_FILTER_SELECTIVE_BLUR;
for ($i = 1; $i <= $amount; $i++) {
imagefilter($this->resource, $blurType);
}
$this->output = $this->resource;
return $this;
}