[eluser]matches[/eluser]
Hi,
Can I get some help with the image resize method?
I am getting the following error:
Fatal error: Call to a member function resize() on a non-object
Thanks for any help.
Code:
<?php
foreach($query as $row):
$path = APPPATH . "agent_property_images/ianseabock/Alameda/436_Taylor";
$dir_handle = @opendir($path) or die("Unable to open folder");
while (false !== ($file = readdir($dir_handle))) {
if($file == "index.php")
continue;
if($file == ".")
continue;
if($file == "..")
continue;
$config['image_library'] = 'gd2';
$config['source_image'] = 'http://localhost/sfbaoh/' . $path . '/' . $file;
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 75;
$config['height'] = 50;
$this->load->library('image_lib', $config);
//THIS IS THE LINE THROWING THE ERROR
$this->image_lib->resize();
}
closedir($dir_handle);
echo $row->address_1;
echo $row->address_2;
echo $row->city; echo $row->state; echo $row->zip;
endforeach; ?>