$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();
This is water mark code in php, it is working fine when we add text to curve image like mug image, the letter is not overlap the curved image how can we overcome?
You added this to your code:
$config['wm_vrt_alignment'] = 'bottom';
$config['wm_hor_alignment'] = 'center';
So I guess it won't overlap the corners, unless the text is as long/wide as the image itself, so that it reaches the corners. Maybe change the padding wm_padding
so that it's as wide or wider than the curve/border radius?
And like Alix Axel said, please post some relevant code for more detailed/usable answers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With