Welcome Guest, Not a member yet? Register   Sign In
How hard can it be?
#8

[eluser]xwero[/eluser]
I guess this is what you need.
Code:
$files = array(1,2,3,4,5) // you have to add actual input names of course
$this->load->library('upload');
// $up_config settings
$this->load->library('image_lib');
// $img_crop_config and $img_wm_config settings without source_image
foreach($files as $file)
{
   $this->upload->initialize($up_config);
   if($this->upload->do_upload($file))
   {
      $data = $this->upload->data();
      $img_crop_config['source_image'] = $img_wm_config['source_image'] = $data['full_path'];
      $this->image_lib->initialize($img_crop_config);
      $this->image_lib->crop();
      $this->image_lib->clear();
      $this->image_lib->initialize($img_wm_config);
      $this->image_lib->watermark();
      $this->image_lib->clear(); // clear image_lib settings for next loop
   }
}


Messages In This Thread
How hard can it be? - by El Forum - 12-28-2008, 02:34 PM
How hard can it be? - by El Forum - 12-28-2008, 03:01 PM
How hard can it be? - by El Forum - 12-28-2008, 04:09 PM
How hard can it be? - by El Forum - 12-28-2008, 10:54 PM
How hard can it be? - by El Forum - 12-29-2008, 12:05 AM
How hard can it be? - by El Forum - 12-29-2008, 01:13 AM
How hard can it be? - by El Forum - 12-29-2008, 07:40 AM
How hard can it be? - by El Forum - 12-29-2008, 08:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB