Shijin TR
Shijin TR

Reputation: 7768

Codeigniter image resize quality gone

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

Answers (1)

Bira
Bira

Reputation: 5506

'quality' => '100%' Please keep the quality in percentage and try. And you should use the GD Image Library too

Upvotes: 1

Related Questions