CodeIgniter crop() without maintain_ration
Posted
by Mango
on Stack Overflow
See other posts from Stack Overflow
or by Mango
Published on 2010-03-12T22:44:08Z
Indexed on
2010/03/12
22:47 UTC
Read the original article
Hit count: 532
codeigniter
|crop
I have this function above witch even maintain_ration set false, cutting with this proportion. I just want crop without ratio.
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();
}
© Stack Overflow or respective owner