CoreFiles by mySites.guru
Brightness.php49 lines, 1,422 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
6ef0bb59e90dbf2c6cdd1d324e95b4a3
sha1
14f52399fa280d4947a9c3253e24ad528e82d28f
sha256
424a28267ed14dd8ecb835734287afbf5c0140d1ebafa424413334077a4ce721
<?php
/**
 * @package     Joomla.Platform
 * @subpackage  Image
 *
 * @copyright   Copyright (C) 2005 - 2019 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('JImageFilterBrightness is deprecated, use Joomla\Image\Filter\Brightness instead.', Log::WARNING, 'deprecated');

/**
 * Image Filter class adjust the brightness of an image.
 *
 * @since       1.7.3
 * @deprecated  5.0  Use Joomla\Image\Filter\Brightness instead
 */
class Brightness 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\Brightness::execute() instead
	 */
	public function execute(array $options = array())
	{
		// Validate that the brightness value exists and is an integer.
		if (!isset($options[IMG_FILTER_BRIGHTNESS]) || !\is_int($options[IMG_FILTER_BRIGHTNESS]))
		{
			throw new \InvalidArgumentException('No valid brightness value was given.  Expected integer.');
		}

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

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