Welcome Guest, Not a member yet? Register   Sign In
How do you scale/fit an image?
#1

CI3 Image Manipulation library can resize() or crop() image, but it would be great if it had a method to scale an image like scale()!

I need to scale an image, for example what ever the image size is i would like to resize it to 200x200.

To achieve that i have this code, but it still doesn't resize all the images in 200x200 size again i want to scale the image!
PHP Code:
$img_properties = [
            
'image_library'  => 'gd2',
            
'source_image'   => $image,
            
'create_thumb'   => false,
            
'maintain_ratio' => true,
            
'width'          => 200,
            
'height'         => 200,
            
'master_dim'     => 'auto'
        
];
        
$this->load->library('image_lib'$img_properties);
        
$this->image_lib->resize(); 

What would be the idea in this case?
Thanks and wish you a great day Smile
Reply


Messages In This Thread
How do you scale/fit an image? - by rakibtg - 06-22-2015, 02:56 PM
RE: How do you scale/fit an image? - by CroNiX - 06-22-2015, 03:00 PM
RE: How do you scale/fit an image? - by rakibtg - 06-22-2015, 03:18 PM
RE: How do you scale/fit an image? - by CroNiX - 06-22-2015, 03:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB