[eluser]Unknown[/eluser]
I am new and can not make this work ...
I am trying to upload and image using upload library then use mat-moo to create watermark ..
here is my code ..
Code:
$config = array(
'upload_path' => './uploads/phones/',
'allowed_types' => 'gif|jpg|png',
'max_size' => '2048',
'max_width' => '1024',
'max_height' => '1024',
'encrypt_name' => TRUE,
);
$this->load->library('upload', $config);
if (!$this->upload->do_upload()) {
$data['errors'] = $this->upload->display_errors();
}else{
$upload_data = $this->upload->data();
}
$this->load->library('image_moo');
$this->image_moo
->load($upload_data['full_path'])
->load_watermark("/assets/img/logo.png")
->resize(500,440)
->watermark(5)
->save_dynamic();
print $this->image_moo->display_errors();
my images are in uploads/phones/ an watermark logo is in /assets/img/logo.png