imagefilter example

/** * {@inheritdoc} */
  protected function execute(array $arguments) {
    // PHP installations using non-bundled GD do not have imagefilter.     if (!function_exists('imagefilter')) {
      $this->logger->notice("The image '@file' could not be desaturated because the imagefilter() function is not available in this PHP installation.", ['@file' => $this->getToolkit()->getSource()]);
      return FALSE;
    }

    return imagefilter($this->getToolkit()->getResource(), IMG_FILTER_GRAYSCALE);
  }

}
Home | Imprint | This part of the site doesn't use cookies.