tags:

views:

17

answers:

0
$path= 'system/application/';        
                    $vendorname='mug';
                    $water= ''.$vendorname.'.jpg';                                 
                    $config['wm_type'] = 'text';
                    $config['source_image'] =  $path.'/images/'.$water.'';  
                    $config['new_image'] =   $path.'/uploads/'.$water.'';               
                    $config['wm_text'] = "welcome";
                    $config['wm_font_size'] = "40";
                    //$config['wm_font_path'] = 'system/fonts/texb.ttf';
                   $config['wm_font_color'] = '25cc04';
                    $config['wm_vrt_alignment'] = 'center';
                    $config['wm_hor_alignment'] = 'left';
                    $config['wm_hor_offset'] = '110';
                    $config['wm_vrt_offset'] = '188';
                    $config['wm_padding'] = '0';
                    $this->image_lib->initialize($config);
                    if ( ! $this->image_lib->watermark())
                    {
                    echo $this->image_lib->display_errors();
                    }
                   $water= ''.$vendorname.'.jpg';
                    $this->load->view( "view_home");

this is the add text to image code i want to change text dynamically previous code text is :welcome when we add log words "welcome to my site letter" is skip to the image please help me