I have this function above witch even maintain_ration set false, cutting with this proportion. In this case the result is an image with 150x113px, because the original image has 400x300.
function do_crop() {
$config = array(
'image_library' => 'gd2',
'source_image' => realpath(APPPATH . '../upload_img/solg6.jpg'),
'new_image' => $this->gallery_path_url . 'thumbaaa.jpg',
'maintain_ration' => false,
'width' => 150,
'height' => 150,
'x_axis' => 20,
'y_axis' => 20
);
$this->load->library('image_lib');
$this->image_lib->initialize($config);
if ( ! $this->image_lib->crop())
{
echo $this->image_lib->display_errors();
}
$this->image_lib->clear();
}
I just want crop without ratio.