src/bbn/file/image.php
public function brightness($val='+')
	{
		if ( $this->test() )
		{
			if ( class_exists('\\Imagick') )
			{
				$p = ( $val == '-' ) ? 90 : 110;
				if ( !$this->img->modulateImage($p,100,100) ){
					$this->error = \defined('BBN_THERE_HAS_BEEN_A_PROBLEM') ?
						BBN_THERE_HAS_BEEN_A_PROBLEM : 'There has been a problem';
				}
			}
			else if ( function_exists('imagefilter') )
			{
				$p = ( $val == '-' ) ? -20 : 20;
				if ( !imagefilter($this->img,IMG_FILTER_BRIGHTNESS,-20) ){
					$this->error = \defined('BBN_THERE_HAS_BEEN_A_PROBLEM') ?
						BBN_THERE_HAS_BEEN_A_PROBLEM : 'There has been a problem';
				}
			}
		}
		return $this;
	}
public function brightness($val='+')
	{
		if ( $this->test() )
		{
			if ( class_exists('\\Imagick') )
			{
				$p = ( $val == '-' ) ? 90 : 110;
				if ( !$this->img->modulateImage($p,100,100) ){
					$this->error = \defined('BBN_THERE_HAS_BEEN_A_PROBLEM') ?
						BBN_THERE_HAS_BEEN_A_PROBLEM : 'There has been a problem';
				}
			}
			else if ( function_exists('imagefilter') )
			{
				$p = ( $val == '-' ) ? -20 : 20;
				if ( !imagefilter($this->img,IMG_FILTER_BRIGHTNESS,-20) ){
					$this->error = \defined('BBN_THERE_HAS_BEEN_A_PROBLEM') ?
						BBN_THERE_HAS_BEEN_A_PROBLEM : 'There has been a problem';
				}
			}
		}
		return $this;
	}
public function brightness ( $ val = '+' ) { if ( $ this -> test ( ) ) { if ( class_exists ( '\\Imagick' ) ) { $ p = ( $ val == '-' ) ? 90 : 110 ; if ( ! $ this -> img -> modulateImage ( $ p , 100 , 100 ) ) { $ this -> error = \ defined ( 'BBN_THERE_HAS_BEEN_A_PROBLEM' ) ? BBN_THERE_HAS_BEEN_A_PROBLEM : 'There has been a problem' ; } } else if ( function_exists ( 'imagefilter' ) ) { $ p = ( $ val == '-' ) ? - 20 : 20 ; if ( ! imagefilter ( $ this -> img , IMG_FILTER_BRIGHTNESS , - 20 ) ) { $ this -> error = \ defined ( 'BBN_THERE_HAS_BEEN_A_PROBLEM' ) ? BBN_THERE_HAS_BEEN_A_PROBLEM : 'There has been a problem' ; } } } return $ this ; }
Adjusts the image's brightness.

```php
$img = new bbn\file\image("/home/data/test/image.jpg");
$img->brightness();
$img->brightness("-");
```

@param string $val The value "+" (default) increases the brightness, the value ("-") reduces it.
@return image
Adjusts the image s brightness .