Welcome Guest, Not a member yet? Register   Sign In
Image Manipulation Class - proportionally resize?
#1

[eluser]inari[/eluser]
I just can't find it anywhere, all I need is to set image width, not height, but I want it to be resized proportionally.

Is that possible?

Now all I get is peaked image.

Code:
$config['image_library'] = 'gd2';
                $config['source_image'] = '../uploads/'.$file['file_name'];
                $config['create_thumb'] = TRUE;
                $config['maintain_ratio'] = TRUE;
                $config['width'] = 90;
                $config['master_dim'] = 'auto';

                $this->load->library('image_lib', $config);


And I don't want it to keep original file. How?
And I need to get new name of thumbed image. How?
#2

[eluser]Bramme[/eluser]
get rid of the $create_thumb value, or set it to false, set a height to 10 and set master_dim to width. The new name will be the same as your source image...
#3

[eluser]inari[/eluser]
Thanks, it works




Theme © iAndrew 2016 - Forum software by © MyBB