Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Dylan Lopez
Added: Mar 6, 2018 9:08 AM
Views: 12
  1. $config['image_library'] = 'gd2';
  2. $config['source_image'] = '/path/to/image/mypic.jpg';
  3. $config['create_thumb'] = TRUE;
  4. $config['maintain_ratio'] = TRUE;
  5. $config['width']         = 75;
  6. $config['height']       = 50;
  7.  
  8. $this->load->library('image_lib', $config);
  9.  
  10. $this->image_lib->resize();