original_string: public function grayscale()
  	{
  		if ( $this->test() )
  		{
  			if ( class_exists('\\Imagick') )
  			{
  				if ( !$this->img->modulateImage(100,0,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') )
  			{
  				if ( !imagefilter($this->img,IMG_FILTER_GRAYSCALE) ){
  					$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 grayscale()
  	{
  		if ( $this->test() )
  		{
  			if ( class_exists('\\Imagick') )
  			{
  				if ( !$this->img->modulateImage(100,0,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') )
  			{
  				if ( !imagefilter($this->img,IMG_FILTER_GRAYSCALE) ){
  					$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 grayscale ( ) { if ( $ this -> test ( ) ) { if ( class_exists ( '\\Imagick' ) ) { if ( ! $ this -> img -> modulateImage ( 100 , 0 , 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' ) ) { if ( ! imagefilter ( $ this -> img , IMG_FILTER_GRAYSCALE ) ) { $ this -> error = \ defined ( 'BBN_THERE_HAS_BEEN_A_PROBLEM' ) ? BBN_THERE_HAS_BEEN_A_PROBLEM : 'There has been a problem' ; } } } return $ this ; }
docstring: Converts the image's color to grayscale.
  
  ```php
  $img = new bbn\file\image("/home/data/test/image.jpg");
  $img->grayscale()->save();
  ```
  
  @return image
docstring_tokens: Converts the image s color to grayscale .