CoreFiles by mySites.guru
Smooth.php48 lines, 1,359 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
bf2adbecc747eaf7cc8b672710c6dd7d
sha1
8699bcae275b1018743e710e052ac0e8908303ea
sha256
8eed9cd4ae14e6b5ae41fa364ce1e2a208f93676ea795f4ed5257a2dd0826c5e
<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Image
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @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;

\JLog::add('JImageFilterSmooth is deprecated, use Joomla\Image\Filter\Smooth instead.', \JLog::WARNING, 'deprecated');

/**
 * Image Filter class adjust the smoothness of an image.
 *
 * @since       11.3
 * @deprecated  5.0  Use Joomla\Image\Filter\Smooth instead
 */
class Smooth extends ImageFilter
{
	/**
	 * Method to apply a filter to an image resource.
	 *
	 * @param   array  $options  An array of options for the filter.
	 *
	 * @return  void
	 *
	 * @since   11.3
	 * @throws  \InvalidArgumentException
	 * @deprecated  5.0  Use Joomla\Image\Filter\Smooth::execute() instead
	 */
	public function execute(array $options = array())
	{
		// Validate that the smoothing value exists and is an integer.
		if (!isset($options[IMG_FILTER_SMOOTH]) || !is_int($options[IMG_FILTER_SMOOTH]))
		{
			throw new \InvalidArgumentException('No valid smoothing value was given.  Expected integer.');
		}

		// Perform the smoothing filter.
		imagefilter($this->handle, IMG_FILTER_SMOOTH, $options[IMG_FILTER_SMOOTH]);
	}
}

No other release has this exact content. See every version of this file.