Welcome Guest, Not a member yet? Register   Sign In
How does the crop function works ? I followed the user_guide but can't make it work !
#1

[eluser]DocFunky![/eluser]
Hi there,

I can't crop my image automatically, let say I just want a 360 large part of the center of my image, so I did something like that : EDIT: I just put an harcoded x&y_axis to make the exemple simplier ..

Code:
$config['image_library'] = 'GD2';
      $config['source_image'] = $path;
      $config['maintain_ratio'] = TRUE;
      $config['width']  = '250';
      $config['height'] = '360';//Paramètres
      $config['x_axis'] = '200';
      $config['y_axis'] = '200';//normalement pas besoin de rogner ici

      $this->image_lib->initialize($config);

      if ( ! $this->image_lib->crop())
      {
       echo $this->image_lib->display_errors();
      }
      
     print "<img src='".base_url($path)."'  class='preview'>";
     }

Tight after my resize, but the function return the original image, without doing anything, no error message neither. Does anyone know why ?
Thanks Smile


Messages In This Thread
How does the crop function works ? I followed the user_guide but can't make it work ! - by El Forum - 02-25-2012, 03:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB