Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Image Resize not working.

I have these codes below,

function resize_product_photo_test() {
  $config['image_library'] = 'gd2';
  //$config['source_image'] = '/home/xeon9/public_html/barterswapping.com/photo-product/android.jpg';
  $config['source_image'] = './photo-product/android.jpg';
  $config['create_thumb'] = TRUE;
  $config['maintain_ratio'] = TRUE;
  $config['width'] = 150;
  $config['height'] = 100;
  $this->load->library('image_lib', $config);
  if (!$this->image_lib->resize())
      echo $this->image_lib->display_errors();
  } else {
   echo 'resize done!';  

And I don't know why it's not resizing the image?
I tested it and it show no error.
What could be the problem?

Thanks in advanced.

I've got exact same issue!

I found the error:

I had to add this:

   $this->load->library('image_lib', $config);

Theme © iAndrew 2016 - Forum software by © MyBB