Welcome Guest, Not a member yet? Register   Sign In
Image Reisze Lib for CI - HELP!!!
#1

[eluser]dennismonsewicz[/eluser]
So I found out that CI has a built in image manipulation class... but there is no tutorial on really how to utilize it to display images, other than giving you the options to set it up... here is my code:

Code:
$this->data['photos'] = get_filenames('images/photos');
        
        foreach($this->data['photos'] as $p) {
        
            $config['image_library'] = 'gd2';
            $config['source_image'] = '/images/photos/' . $p;
            //$config['create_thumb'] = TRUE;
            $config['maintain_ratio'] = TRUE;
            $config['width'] = 183;
            //$config['height'] = 50;
            
        }
        
        $this->load->library('image_lib', $config);
        
        $this->data['p'] = $this->image_lib->resize();

What am I doing wrong? Sad
#2

[eluser]Unknown[/eluser]
Take a look at this page: http://www.noquieroprogramar.com/generar...deigniter/

It's a Spanish blog, but hope you understand the code for your purpose.




Theme © iAndrew 2016 - Forum software by © MyBB