CoreFiles by mySites.guru
Smooth.php49 lines, 1,381 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
e38919d31acd7e502d2427ca2b1d6583
sha1
a75af60d1bfb14c3982cdac69be6c2bf61ac91d8
sha256
56279911508646905e1956d0f355a544592acbb685f07038c6b9905c946fb625
<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Image
 *
 * @copyright   Copyright (C) 2005 - 2018 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;
use Joomla\CMS\Log\Log;

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

/**
 * Image Filter class adjust the smoothness of an image.
 *
 * @since       1.7.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   1.7.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]);
	}
}

The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.