Reputation: 7768
I am using the following code to resize an image in Codeigniter. The resize function was working fine.But when i try to resize a large resolution image.The clarity is gone. Anyone know what is the reason?
I was try with image haveing 1920x1080px size.
$config['image_library'] = 'ImageMagick';
$config['library_path'] = '/usr/bin';
$config['source_image'] = Path_to_image;
$config['create_thumb'] = FALSE;
$config['maintain_ratio'] = TRUE;
$config['width'] = new_image_width;
$config['height'] = new_image_height;
$config['quality'] = 100;
$config['new_image'] = new_image_src;
$this->load->library('image_lib', $config);
$this->image_lib->initialize($config);
$this->image_lib->resize();
Upvotes: 0
Views: 1465
Reputation: 5506
'quality' => '100%'
Please keep the quality in percentage and try.
And you should use the GD Image Library too
Upvotes: 1