CoreFiles by mySites.guru
Grayscale.php36 lines, 754 bytes, from Joomla_4.0.2-Stable-Full_Package.zip
Raw History Compare with 4.0.1
md5
0af5c938cc7148e8c8fcca576ae8f376
sha1
28d32f953a6115fcccf911fcf9e2f12cd729713c
sha256
ff293c5e26a3439c908e5d90fc5d60aa911d19bf27a2122ae4efb8bd279a0609
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright   (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

namespace Joomla\CMS\Image\Filter;

\defined('JPATH_PLATFORM') or die;

use Joomla\CMS\Image\ImageFilter;

/**
 * Image Filter class to transform an image to grayscale.
 *
 * @since  2.5.0
 */
class Grayscale extends ImageFilter
{
	/**
	 * Method to apply a filter to an image resource.
	 *
	 * @param   array  $options  An array of options for the filter.
	 *
	 * @return  void
	 *
	 * @since   2.5.0
	 */
	public function execute(array $options = [])
	{
		// Perform the grayscale filter.
		imagefilter($this->handle, IMG_FILTER_GRAYSCALE);
	}
}

The same content is in 42 releases, Joomla 4.0.1 to 4.2.0-beta2. See them all, or every version of this file.