original_string: 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;
  	}
code: 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;
  	}
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Adjusts the image s brightness .