Welcome Guest, Not a member yet? Register   Sign In
Image library & foreach
#2

[eluser]Pascal Kriete[/eluser]
The image library (and all other CI libraries), are only instantiated once. So calling the loader again will not change the config settings. Instead you'll want to use the initialize() and clear() functions:
Code:
$this->load->library('image_lib');

foreach($images as $path => $image)
{
    $config['...'] = '....';
    $this->image_lib->initialize($config);

    // Processing goes here

    $this->image_lib->clear();
}


Messages In This Thread
Image library & foreach - by El Forum - 05-26-2009, 04:52 AM
Image library & foreach - by El Forum - 05-26-2009, 05:30 PM
Image library & foreach - by El Forum - 05-27-2009, 12:17 AM
Image library & foreach - by El Forum - 05-27-2009, 12:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB