Welcome Guest, Not a member yet? Register   Sign In
Any way to compress images
#3

[eluser]gvillavizar[/eluser]
[quote author="pistolPete" date="1235592463"]You can change the quality setting in the image manipulation class: http://ellislab.com/codeigniter/user-gui...e_lib.html[/quote]

Thanks for your reply. That worked like a charm.

Another question, can I load the library more than once with different properties in the same controller.

Like

Code:
if($photo1)
{
$config['source_image'] = '/images/' . $photo1];
$config['create_thumb'] = FALSE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 330;
$config['height'] = 280;
$config['quality'] = '100%';
                
$this->load->library('image_lib', $config);

$this->image_lib->resize();

}

if($photo2)
{
$config2['source_image'] = '/images/' . $photo2];
$config2['create_thumb'] = FALSE;
$config2['maintain_ratio'] = TRUE;
$config2['width'] = 330;
$config2['height'] = 280;
$config2['quality'] = '100%';
                
$this->load->library('image_lib', $config2);

$this->image_lib->resize();

}


Messages In This Thread
Any way to compress images - by El Forum - 02-25-2009, 08:01 AM
Any way to compress images - by El Forum - 02-25-2009, 08:07 AM
Any way to compress images - by El Forum - 02-25-2009, 08:36 AM
Any way to compress images - by El Forum - 02-25-2009, 09:09 AM
Any way to compress images - by El Forum - 02-25-2009, 09:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB