Welcome Guest, Not a member yet? Register   Sign In
Problem with creating thumb image Codeigniter
#1

[eluser]Unknown[/eluser]
Hello! There is my function:
Code:
<? function resize_image($path, $path_image)
   {
       $CI = & get_instance();

       $config = array();

       $config['image_library'] = 'ImageMagick';
       $config['source_image'] = $path; //full path
       $config['new_image'] = $path_image.'new_image.jpg';
       $config['create_thumb'] = TRUE; // ставим флаг создания эскиза
       $config['maintain_ratio'] = TRUE; // сохранять пропорции
       $config['width']     = 200; // и задаем размеры
       $config['height']   = 200;

       $CI->load->library('image_lib');
       $CI->image_lib->initialize($config);

           if ( ! $CI->image_lib->resize())
           {
               echo $CI->image_lib->display_errors();
               die();
           }
           $CI->image_lib->clear();



   }?>

I try to make thumb image by library ImageMagick, but i get error:
The path to your image library is not correct. Please set the correct path in your image preferences.
How fix it?


Messages In This Thread
Problem with creating thumb image Codeigniter - by El Forum - 05-06-2013, 02:10 PM
Problem with creating thumb image Codeigniter - by El Forum - 05-07-2013, 03:14 AM
Problem with creating thumb image Codeigniter - by El Forum - 05-07-2013, 06:44 AM
Problem with creating thumb image Codeigniter - by El Forum - 05-08-2013, 02:47 AM
Problem with creating thumb image Codeigniter - by El Forum - 05-08-2013, 02:48 AM
Problem with creating thumb image Codeigniter - by El Forum - 05-08-2013, 03:45 AM
Problem with creating thumb image Codeigniter - by El Forum - 05-08-2013, 08:00 AM
Problem with creating thumb image Codeigniter - by El Forum - 05-08-2013, 08:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB