CoreFiles by mySites.guru
Brightness.php48 lines, 1,398 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
725d270adb58f701d566df60b852ab3f
sha1
ef86a91badc18075287fc462cf4285f0fe2788a4
sha256
1c0f5c762c1955c83f4a0d95588c060e2f1e973fbe5c1316dfa80e2129d70954
<?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('JImageFilterBrightness is deprecated, use Joomla\Image\Filter\Brightness instead.', \JLog::WARNING, 'deprecated');

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

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