Welcome Guest, Not a member yet? Register   Sign In
Generate Thumbnails (Image Lib Resize)
#1

[eluser]gRoberts[/eluser]
Hey all,

Can anyone point out a reason why this wont work? It doesn't report any issues, but also doesn't create an image.

Code:
function generateThumbnail($base, $source, $output, $width, $height, $watermark = true) {
        $dir = dirname($output);
        if(!is_dir($dir))
            recursive_mkdir($dir);
                
        $config['image_library'] = 'GD';
        $config['source_image'] = $source;
        $config['create_thumb'] = true;
        $config['new_image'] = $output;
        $config['maintain_ratio'] = TRUE;
        $config['width'] = $width;
        $config['height'] = $height;
        
        $base->load->library('image_lib', $config);
        if(!$base->image_lib->resize())
            echo 'Unable to create thumbnail';
        
        if($watermark)
            applyWatermarkToImage($base, $output);    
        
    }

Any advice would be appreciated!

Cheers


Messages In This Thread
Generate Thumbnails (Image Lib Resize) - by El Forum - 12-09-2007, 01:26 PM
Generate Thumbnails (Image Lib Resize) - by El Forum - 12-09-2007, 03:16 PM
Generate Thumbnails (Image Lib Resize) - by El Forum - 12-09-2007, 03:42 PM
Generate Thumbnails (Image Lib Resize) - by El Forum - 12-09-2007, 03:51 PM
Generate Thumbnails (Image Lib Resize) - by El Forum - 12-09-2007, 04:31 PM
Generate Thumbnails (Image Lib Resize) - by El Forum - 12-10-2007, 01:35 AM
Generate Thumbnails (Image Lib Resize) - by El Forum - 12-10-2007, 09:24 AM
Generate Thumbnails (Image Lib Resize) - by El Forum - 12-10-2007, 11:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB