Как создать водяной знак изображения wm_type наложения в Codeigniter?

Я пытаюсь поместить изображение поверх другого изображения (водяного знака) так:

class Water_mark extends CI_Controller { function __construct() { parent::__construct(); } function index() { $this->load->library('image_lib'); $config['image_library'] = 'GD2'; $config['source_image'] = '/assets/images/tv-share.jpg'; $config['new_image'] = '/assets/images/tv-share-done.jpg'; $config['wm_type'] = 'overlay'; $config['wm_overlay_path'] = '/assets/images/share_en.jpg'; $config['wm_opacity'] = '50'; $config['wm_vrt_alignment'] = 'top'; $config['wm_hor_alignment'] = 'left'; $config['wm_hor_offset'] = '10'; $config['wm_vrt_offset'] = '10'; $data = $config; $this->image_lib->initialize($config); if (!$this->image_lib->watermark()) { echo $this->image_lib->display_errors(); } $this->image_lib->clear(); $this->load->view('water_mark_view', $data); } } 

но я продолжаю получать ошибки:

 A PHP Error was encountered Severity: Warning Message: imagecolorat() expects parameter 1 to be resource, boolean given Filename: libraries/Image_lib.php Line Number: 941 A PHP Error was encountered Severity: Warning Message: imagecolorat() expects parameter 1 to be resource, boolean given Filename: libraries/Image_lib.php Line Number: 953 A PHP Error was encountered Severity: Warning Message: imagecolortransparent() expects parameter 1 to be resource, boolean given Filename: libraries/Image_lib.php Line Number: 953 A PHP Error was encountered Severity: Warning Message: imagecopymerge() expects parameter 1 to be resource, boolean given Filename: libraries/Image_lib.php Line Number: 954 The path to the image is not correct. The path to the image is not correct. The path to the image is not correct. Your server does not support the GD function required to process this type of image. Your server does not support the GD function required to process this type of image. Your server does not support the GD function required to process this type of image. 

GD phpinfo

Что мне не хватает?

Related of "Как создать водяной знак изображения wm_type наложения в Codeigniter?"

Проблема была такой же простой, как удаление косой черты (хотя в примере с документацией имеется прямая слэш), когда он начинается так:

 $config['source_image'] = 'assets/images/tv-share.jpg'; $config['new_image'] = 'assets/images/tv-share-done.jpg'; $config['wm_overlay_path'] = 'assets/images/share_en.jpg'; 

что заставило меня смутить эту ошибку:

Ваш сервер не поддерживает функцию GD, необходимую для обработки этого типа изображения.

Я никогда не думал, что это только проблема, когда я увидел ошибку выше.