Welcome Guest, Not a member yet? Register   Sign In
Image resize doesn't resize with same dimensions...!!!
#1

[eluser]Zeeshan Rasool[/eluser]
Hi all,
Here im trying to uploading an image with actual size 757x497 and resize it after uploading to 625x495 but it resize it to 625x411..
height is less than my given range..
Please any idea?
thanks in adv.

Code:
Code:
$config_image['image_library']     = 'gd2';
$config_image['source_image']      = './resources/projects/'.$project_id.'/'.$file_name;
$config_image['new_image']      = './resources/projects/'.$project_id.'/'.$file_name;
$config_image['create_thumb']     = FALSE;
$config_image['maintain_ratio']  = TRUE;
$config_image['width']          = 625;
$config_image['height']      = 495;
                
$this->load->library('image_lib',$config_image);
$this->image_lib->initialize($config_image);
$this->image_lib->resize();
#2

[eluser]Dam1an[/eluser]
I'm guessing it's because you have maintain_ratio set to true, and I'm guessing width is the deciding factor in that case. To test this, try disabling maintain_ratio
#3

[eluser]Zeeshan Rasool[/eluser]
Great...! its working now. thanks Dam1an you've been always very fast replyer




Theme © iAndrew 2016 - Forum software by © MyBB