[eluser]dimis[/eluser]
I made a function in a helper that copy and resize photos.
My problem is that since it copy and resize one image it does not do it with other images.
What maybe wrong?
Code:
function photocopy($file,$height,$width,$path)
{
$config['image_library'] = 'gd2';
// die($path.$name);
$config['source_image'] = $file;
// $config['create_thumb'] = TRUE;s
$config['maintain_ratio'] = TRUE;
$config['width'] =$width;// 100;
$config['height'] =$height;// 100;
$config['new_image'] = $path;
$CI =& get_instance();
$CI->load->library('image_lib', $config);
$CI->image_lib->resize();
// return $name;
}
I call this function as
Code:
photocopy($this->config->item('pr').$this->data['product'][0]['color_photo'],
61,128,$this->config->item('prview'));