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

[eluser]solid9[/eluser]
I have these codes below,

Code:
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.
#2

[eluser]behnampmdg3[/eluser]
I've got exact same issue!
#3

[eluser]behnampmdg3[/eluser]
I found the error:

I had to add this:

Code:
$this->image_lib->initialize($config);
   $this->load->library('image_lib', $config);
daaaa




Theme © iAndrew 2016 - Forum software by © MyBB