CodeIgniter Forums
how to write 2 or more text watermark using image_lib ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: how to write 2 or more text watermark using image_lib ? (/showthread.php?tid=69001)



how to write 2 or more text watermark using image_lib ? - arabgenius - 09-26-2017

hello
Am using image_lib and it works very nice
--------------
      $config['source_image'] = getcwd().'/upload/photo.jpg';
      $config['wm_text'] = "text 1";
      $config['wm_type'] = 'text';
      $config['wm_font_path'] = './application/fonts/arial.ttf';
      $config['wm_font_size'] = '18';
      $config['wm_font_color'] = 'ffffff';
      $config['wm_vrt_alignment'] = 'top';
      $config['wm_hor_alignment'] = 'center';
      $config['wm_padding'] = '10';
      $config['dynamic_output'] = true;
      $config['wm_hor_offset'] = '120';
      $config['wm_vrt_offset'] = '100';

      $this->load->library('image_lib',$config); 
      $this->image_lib->initialize($config);

      if ( ! $this->image_lib->watermark())
      {
              echo $this->image_lib->display_errors();
      }
      $this->image_lib->clear();
-------------

yet I have at least 3 different text which I want to put in the photo ( different positions )
how should I do that ?