Welcome Guest, Not a member yet? Register   Sign In
Facing problem in Create a Water Mark in codeigniter
#1

[eluser]Unknown[/eluser]
Hi Gaye's,

I have using the bellow code for watermark.
I am neither getting any error nor the watermark on the image.
it return
Quote:success
message.

I have uploaded the font file. in system folder.

Code:
function SetWaterMark(){ //$Text,$Image

  $PHOTOPATH=$_SERVER['DOCUMENT_ROOT'].'/resources/store/photo/original/1324371461.jpg';
  //@chmod($PHOTOPATH,0777);
  
  $config['source_image'] = $PHOTOPATH;
  $config['wm_text'] = 'Copyright 2006';
  $config['wm_type'] = 'text';
  $config['quality'] = '100%';
  $config['wm_font_path'] = $_SERVER['DOCUMENT_ROOT'].'/system/fonts/arial.ttf';
  $config['wm_font_size'] = '25';
  $config['wm_font_color'] = '#000000';
  $config['wm_vrt_alignment'] = 'bottom';
  $config['wm_hor_alignment'] = 'center';
  $config['wm_padding'] = '40';
  
  $this->image_lib->initialize($config);
  
  if($this->image_lib->watermark()){
    echo 'success';
  }else{
    echo $this->image_lib->display_errors();

   echo 'fail';
  }
}

Your help is gr8 for me.
thanks in advance,
judhisthira




Theme © iAndrew 2016 - Forum software by © MyBB