Welcome Guest, Not a member yet? Register   Sign In
Watermarking image with image overlay
#1

Hello,

In CI3, I used to watermark images with an overlay of another image.

It looked like this: 
PHP Code:
   $this->load->library('image_lib');

                
$config['source_image']    = $filepath;
        
$config['image_library'] = 'GD2';
        
$config['wm_type'] = 'overlay';
        
$config['wm_overlay_path'] = realpath(APPPATH '../uploads/watermark.png');
        
$config['wm_vrt_alignment'] = 'bottom';
        
$config['wm_hor_alignment'] = 'right';
        
$config['wm_padding'] = '-10';
        
$this->image_lib->initialize($config);
        
$this->image_lib->watermark();

        
$this->image_lib->clear();
        unset(
$config); 

I want to do the same thing in CI4, but I see only a possibility to watermark with plane text overlay in the documentation.

Am I missing something?

Thanks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB