public function doFilter($file, $arguments, $typeOptions)
    {
        if (! $arguments['grayscale']) {
            return;
        }

        $Imagine = new Imagine();
        $image = $Imagine->open($file);
        $image->effects()->grayscale();
        $image->save($file);
    }
public function doFilter($file, $arguments, $typeOptions)
    {
        if (! $arguments['grayscale']) {
            return;
        }

        $Imagine = new Imagine();
        $image = $Imagine->open($file);
        $image->effects()->grayscale();
        $image->save($file);
    }
public function doFilter ( $ file , $ arguments , $ typeOptions ) { if ( ! $ arguments [ 'grayscale' ] ) { return ; } $ Imagine = new Imagine ( ) ; $ image = $ Imagine -> open ( $ file ) ; $ image -> effects ( ) -> grayscale ( ) ; $ image -> save ( $ file ) ; }
Turn an image Grayscale

@param string $file
@param array $arguments
@param array $typeOptions

@return void
Turn an image Grayscale