public function apply($resource) { @(list(, $method) = func_get_args()); switch ($method) { case self::FILTER: if (!function_exists('imagefilter')) { throw new Exception("It seems your PHP version is not compiled with the bundled version of the GD library"); } if (!imagefilter($resource, IMG_FILTER_EMBOSS)) { throw new Exception("EMBOSS filter failed"); } return $resource; case self::MATRIX: default: return parent::apply($resource, array(-2, -1, 0, -1, 1, 1, 0, 1, 2)); } }
public function apply($resource) { @(list(, $method) = func_get_args()); switch ($method) { case self::FILTER: if (!function_exists('imagefilter')) { throw new Exception("It seems your PHP version is not compiled with the bundled version of the GD library, therefore you cannot use this graphic effect"); } if (!imagefilter($resource, IMG_FILTER_MEAN_REMOVAL)) { throw new Exception("MEAN_REMOVAL filter failed"); } return $resource; case self::MATRIX: default: return parent::apply(func_get_arg(0), array(0, -1, 0, -1, 5, -1, 0, -1, 0)); } }
public function apply($resource) { return parent::apply($resource, array(0, -2, 0, -2, 20, -2, 0, -2, 0)); }