Welcome Guest, Not a member yet? Register   Sign In
Image Library not creating image

Hello friends,

I've been trying to make a helper that processes an image filename passed as an argument, and returns a relative path to the newly-created (and resized) image. The helper doesn't error, and returns the correct value, but the actual resized image never gets created. Is there something glaringly wrong about this code?

Thank you for your input.

function resized_image($graphic_filename, $type)
    $CI =& get_instance();
    $image_path = "/home/lfc1450/webapps/lfcfrontend/images/message_images/";
    $cached_path = "/home/lfc1450/webapps/lfcfrontend/images/cached/";
    $url_path = "/images/cached/";

    $config['image_library'] = 'imagemagick';
    $config['library_path'] = '~/bin';
    $config['maintain_ratio'] = TRUE;
    $config['quality'] = '90%';

    if ($type == "billboard")
        $config['source_image'] = $image_path.$graphic_filename;
        $config['new_image'] = $cached_path.'billboard/'.$graphic_filename;
        $config['width'] = 940;
        if ( ! $CI->image_lib->resize())
            echo $CI->image_lib->display_errors();

        return $url_path.'billboard/'.$graphic_filename;

hi try my helper from this post


Theme © iAndrew 2016 - Forum software by © MyBB