private function _getImagine(OutputInterface $output)
    {
        // Use Imagick extension by default
        if (extension_loaded('imagick') && class_exists("Imagick"))
        {
            $output->writeln('Imagick library is used!');
            return new \Imagine\Imagick\Imagine();
        }
        // fall back to GD
        if (extension_loaded('gd') && function_exists('gd_info'))
        {
            $output->writeln('GD library is used!');
            return new \Imagine\Gd\Imagine();
        }
        // Quit if can not find both extensions
        $output->writeln("<error>The `imagick` or `gd` extension must be loaded to generate image</error>");
        exit(1);
    }
private function _getImagine(OutputInterface $output)
    {
        // Use Imagick extension by default
        if (extension_loaded('imagick') && class_exists("Imagick"))
        {
            $output->writeln('Imagick library is used!');
            return new \Imagine\Imagick\Imagine();
        }
        // fall back to GD
        if (extension_loaded('gd') && function_exists('gd_info'))
        {
            $output->writeln('GD library is used!');
            return new \Imagine\Gd\Imagine();
        }
        // Quit if can not find both extensions
        $output->writeln("<error>The `imagick` or `gd` extension must be loaded to generate image</error>");
        exit(1);
    }
private function _getImagine ( OutputInterface $ output ) { // Use Imagick extension by default
 if ( extension_loaded ( 'imagick' ) && class_exists ( "Imagick" ) ) { $ output -> writeln ( 'Imagick library is used!' ) ; return new \ Imagine \ Imagick \ Imagine ( ) ; } // fall back to GD
 if ( extension_loaded ( 'gd' ) && function_exists ( 'gd_info' ) ) { $ output -> writeln ( 'GD library is used!' ) ; return new \ Imagine \ Gd \ Imagine ( ) ; } // Quit if can not find both extensions
 $ output -> writeln ( "<error>The `imagick` or `gd` extension must be loaded to generate image</error>" ) ; exit ( 1 ) ; }
Get the imagine object based on the options. Default will use Imagick
extension

@param InputInterface $input
@param OutputInterface $output
@return \Imagine\Image\AbstractImagine
Get the imagine object based on the options . Default will use Imagick extension