0

この API へのアクセス中に問題が発生しました。私が間違っているところを教えてください。

public function index()
{

    require_once('./application/libraries/imagine_autoloader.php');

    $imagine = new \Imagine\Gd\Imagine();

    $image = $imagine->open('assets/a1.jpg'); /**Getting error here */


    $thumbnail = $image->thumbnail(new Imagine\Image\Box(100, 100));
    $thumbnail->save('assets/thumnail_image1.jpg');
    $this->load->view('welcome_message');
}

エラーは次のとおりです。

[Thu Jul 26 12:13:24.313248 2018] [:error] [pid 1898] [client 172.17.3.63:53787] PHP Fatal error:  Uncaught exception 'Imagine\\Exception\\RuntimeException' with message 'Gd not installed' in /var/www/html/CodeIgniter-2.2.6/application/libraries/Imagine/Gd/Imagine.php:172
Stack trace:
#0 /var/www/html/CodeIgniter-2.2.6/application/libraries/Imagine/Gd/Imagine.php(39): Imagine\\Gd\\Imagine->loadGdInfo()
#1 /var/www/html/CodeIgniter-2.2.6/application/controllers/welcome.php(25): Imagine\\Gd\\Imagine->__construct()
#2 [internal function]: Welcome->index()
#3 /var/www/html/CodeIgniter-2.2.6/system/core/CodeIgniter.php(360): call_user_func_array(Array, Array)
#4 /var/www/html/CodeIgniter-2.2.6/index.php(202): require_once('/var/www/html/C...')
#5 {main}
thrown in /var/www/html/CodeIgniter-2.2.6/application/libraries/Imagine/Gd/Imagine.php on line 172
4

2 に答える 2