$config['source_image'] = '/path/to/image/mypic.jpg';
$config['wm_text'] = 'Copyright 2006 - John Doe';
$config['wm_type'] = 'text';
$config['wm_font_path'] = './system/fonts/texb.ttf';
$config['wm_font_size'] = '16';
$config['wm_font_color'] = 'ffffff';
$config['wm_vrt_alignment'] = 'bottom';
$config['wm_hor_alignment'] = 'center';
$config['wm_padding'] = '20';
$this->image_lib->initialize($config);
$this->image_lib->watermark();
这是php中的水印代码,当我们将文本添加到像杯子一样的曲线图像时它工作正常
图像,字母不重叠的曲线图像我们怎样才能克服?
解决方法:
您将此添加到您的代码中:
$config['wm_vrt_alignment'] = 'bottom';
$config['wm_hor_alignment'] = 'center';
所以我猜它不会与角重叠,除非文本与图像本身一样长/宽,以便它到达角落.也许更改填充wm_padding,使其宽度或宽度大于曲线/边界半径?
和Alix Axel说的一样,请发布一些相关代码以获得更详细/可用的答案.