Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $thumb_path = $album_path.DS."thumbs";
- mkdir ($thumb_path,0777);
- $config['source_image'] = array();
- $config['new_image'] = array();
- foreach ($files as $image) {
- $config['image_library'] = 'gd';
- $config['create_thumb'] = TRUE;
- $config['width'] = 200;
- $config['height'] = 200;
- $config['source_image'] = $album_path.DS.$image;
- $config['new_image'] = $thumb_path.DS;
- $this->load->library('image_lib', $config);
- $this->image_lib->resize();
- if ( ! $this->image_lib->resize()){
- echo $this->image_lib->display_errors();
- }
- $this->image_lib->clear();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement