Welcome Guest, Not a member yet? Register   Sign In
Problem with Image Manipulation Library
#1

I want to compress the image by 60%. My code is given bellow. I have uploaded an image of 627Kb. The code block is executed but not compressing. Is there any error in my code?

Thanks in advance.

PHP Code:
$this->load->library('image_lib');
if(
$this->upload->data('file_size') > 300){
 
   $config['image_library'   'gd2';
 
   $config['source_image'    $this->upload->data('full_path');
 
   $config['quality'         '60%'// Also tried $config['quality']          = 60;
 
   $config['new_image'       $this->upload->data('full_path');
 
   $this->image_lib->clear();
 
   $this->image_lib->initialize($config);
 
   $this->image_lib->resize();
    echo 
'I am ok';

"Who thinks in code"
Perfectly describes who I am
mbparvez.me
Reply


Messages In This Thread
Problem with Image Manipulation Library - by webdevron - 02-07-2019, 05:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB