Welcome Guest, Not a member yet? Register   Sign In
Image resizing doesn't maintain ratio.
#1

[eluser]Unknown[/eluser]
Hello,

I'm resizing using the image library in CI 2.0 and in the config variable i'm setting maintain_ratio to true and i'm setting the height to 100 pixels. But the resulting image is just resized down to 100 pixels in height and the width isn't altered at all.

Anyone know why this could be? My usage is simple and verbatim to the user guide.

This is my config settings, by the way:

Code:
$config['image_library'] = 'gd2';
   $config['source_image'] = 'path/to/'.$filename;
   $config['new_image'] = '/path/to/thumbs';
   $config['maintain_ratio'] = true;
   $config['height'] = 100;
   $config['quality'] = 95;
   $config['master_dim'] = 'height';

FYI, this only started happening after I updated to CI2.0. I never had any problem in 1.6


Thanks for your help!!




Theme © iAndrew 2016 - Forum software by © MyBB