我想在图像上垂直设置水印。就像下面的图片一样。
这是我的水印代码
$config['source_image'] = '/path';
$config['wm_text'] = 'WaterMark';
$config['wm_type'] = 'text';
$config['wm_font_size'] = '16';
$config['wm_font_color'] = 'ffffff';
$config['wm_vrt_alignment'] = 'bottom';
$config['wm_hor_alignment'] = 'left';
$config['wm_padding'] = '20';
$this->image_lib->initialize($config);
$this->image_lib->watermark();
答案 0 :(得分:0)
您可以像这样使用overlay
图片:
$config['source_image'] = 'source_image.jpg';
$config['wm_type'] = 'overlay';
$config['wm_overlay_path'] = 'overlay_watermark.png';
$config['wm_vrt_alignment'] = 'bottom';
$config['wm_hor_alignment'] = 'left';
$this->load->library('image_lib', $config);
$this->image_lib->watermark();