making thumb |
[eluser]ratna[/eluser]
i want to make the thumb of the uploaded images. Images upload successfully but the relevant thumbs being made. plz suggest.
[eluser]pistolPete[/eluser]
[quote author="ratna" date="1250075268"]plz suggest.[/quote] 1. Read the userguide: http://ellislab.com/codeigniter/user-gui...e_lib.html 2. Post your code.
[eluser]ratna[/eluser]
here is the code !!!!!!! $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '100'; $config['max_width'] = '1024'; $config['max_height'] = '700'; $this->load->library('upload', $config); if ( ! $this->upload->do_upload()) { $error = array('error' => $this->upload->display_errors()); $this->load->view('imageResizeV', $error); } $config['image_library'] = 'gd2'; $config['source_image'] ='uploads/photoname.jpg'; $config['create_thumb'] = TRUE; $config['maintain_ratio'] = TRUE; $config['width'] = 75; $config['height'] = 100; $this->load->library('image_lib', $config); if(!$this->image_lib->resize()) { echo $this->image_lib->display_errors(); } |
Welcome Guest, Not a member yet? Register Sign In |