title: Image crop and resizing with CodeIgniter
body: <p>I'm trying to resize and then upload an image in CodeIgniter. It uploads the image but it doesn't resize it.</p>
  
  <pre><code>$this-&gt;load-&gt;library('image_lib');
  $config['image_library'] = 'gd2';  
  $config['upload_path'] = './assets/uploads';
  $config['allowed_types'] = 'gif|jpg|png|jpeg';
  $config['create_thumb'] = TRUE;  
  $config['maintain_ratio'] = TRUE;  
  $config['quality'] = '60%';  
  $config['width'] = 200;  
  $config['height'] = 200;  
  $this-&gt;load-&gt;library('image_lib', $config);  
  $this-&gt;load-&gt;library('upload', $config);
  $this-&gt;image_lib-&gt;resize()
  
  if ($this-&gt;upload-&gt;do_upload('resim')) {
      $data_upload_files = $this-&gt;upload-&gt;data();
      $image = $data_upload_files['file_name'];
  } else {
      //echo $this-&gt;upload-&gt;display_errors('&lt;p&gt;', '&lt;/p&gt;');
  }
  </code></pre>