title: Codeigniter image cropping is not working
body: <p>I am using codeigniter 3.1 on localhost.
  I am trying to crop images but cropping is not working. Only resize working. So i enabled <code>Gd2</code> php extension. </p>
  
  <p><strong>1.</strong></p>
  
  <pre><code>public function do_crop($filename)
  {
      $this-&gt;load-&gt;library('image_lib');
      $source_path =  'uploads/' . $filename;
      $target_path =  'uploads/thumb/'.$filename;
  
      $config = array(
          'image_library' =&gt; 'gd2',
          'source_image' =&gt; $source_path,
          'new_image' =&gt; $target_path,
          'maintain_ratio' =&gt; FALSE,
          'x_axis' =&gt; 300,
          'y_axis' =&gt; 100,
      );
      $this-&gt;image_lib-&gt;initialize($config);
  } 
  </code></pre>
  
  <p><strong>Image size = 1000X700</strong></p>
  
  <p>The output result is same as original image size <code>1000X700</code></p>
  
  <p><strong>2.</strong></p>
  
  <pre><code>public function do_crop($filename)
      {
          $this-&gt;load-&gt;library('image_lib');
          $source_path =  'uploads/' . $filename;
          $target_path =  'uploads/thumb/'.$filename;
  
          $config = array(
              'image_library' =&gt; 'gd2',
              'source_image' =&gt; $source_path,
              'new_image' =&gt; $target_path,
              'maintain_ratio' =&gt; FALSE,
              'width' =&gt; 300,
              'height' =&gt; 300,
              'x_axis' =&gt; 350,
               'y_axis' =&gt; 50
          );
          $this-&gt;image_lib-&gt;initialize($config);
      } 
  </code></pre>
  
  <p><strong>Image size = 1000X700</strong></p>
  
  <p>And the 2nd example only resize (<code>300x300</code>) the image but not cropped.</p>