You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It crops an images. The difference between this extension and the native crop is it first re-sizes the image to your specification and then crops the re-sized image giving you a fixed image size.
How do I use it?
You use it by calling it like you would a native method. Only difference is you must pass two new config values.
```php
It is recomended that the ar_width/ar_height are the same as width/height.
<h2>Can I see a usage example?</h2>
```php
$this->load->library('image_lib');
$config['image_library'] = 'gd2';
$config['maintain_ratio'] = TRUE;
$config['width'] = 200;
$config['height'] = 100;
$config['ar_width'] = 200; //new config option
$config['ar_height'] = 100; //new config option
$config['source_image'] = '/path/to/image/imagename.jpg';
$config['new_image'] = '/path/to/saved/image/imagename.jpg';
$this->ci->image_lib->initialize($config);
$this->ci->image_lib->adaptive_resize(); //new method