function image_resize($data)
{
$this->CI =& get_instance();
$error="";
$config['image_library'] = 'gd2';
$config['source_image'] = $data['source_image'];
$config['new_image']= $data['new_image'];
$config['create_thumb'] =$data['create_thumb'];
$config['thumb_marker'] = $data['thumb_marker'];
$config['maintain_ratio'] = TRUE;
$config['width'] = $data['width'];
$config['height'] = $data['height'];
$this->CI->load->library('image_lib');
$this->CI->image_lib->clear();
$this->CI->image_lib->initialize($config);
if ( ! $this->CI->image_lib->resize())
{
$error= $this->CI->image_lib->display_errors();
}
Tutorials, Chrome extensions Code samples JavaScript Angular CSS HTML. Updated regularly. Visit and subscribe to the rss feed.
Showing posts with label image resize. Show all posts
Showing posts with label image resize. Show all posts
Thursday, May 6, 2010
Php-codeigniter creating thumbnails
I have created a library function
Subscribe to:
Posts (Atom)