Welcome Guest, Not a member yet? Register   Sign In
Can't process more than one image.
#1

[eluser]Pawel K[/eluser]
Hello,

I have been struggling with an issue I posted about a week back. It seems after losts of testing I can not process more than one image in a script. Here is my code:

Code:
#Main Image
                    $config['image_library'] = 'gd2';
                    $config['source_image'] = "/home/xxxxxxx/www/cart/images/products/1274642339.jpg";
                    $config['create_thumb'] = FALSE;
                    $config['maintain_ratio'] = TRUE;
                    $config['width'] = $this->config->item('img_width');
                    $config['height'] = $this->config->item('img_height');
                    $config['new_image'] = "/home/xxxxx/www/cart/images/products/1-image.jpg";
                    
                    
                    $this->load->library('image_lib', $config);
    
                    if ( ! $this->image_lib->resize())
                    {
                       echo "Image 1 errors:".$this->image_lib->display_errors()."<br>";
                    }
                    $this->image_lib->clear();
                    
                    chmod("/home/xxxx/www/cart/images/products/1274643972.jpg", 0777);
                    
                    #Thumb Image
                    $config['image_library'] = 'gd2';
                    $config['source_image'] = "/home/xxxx/www/cart/images/products/1274643972.jpg";
                    $config['create_thumb'] = FALSE;
                    $config['maintain_ratio'] = FALSE;
                    $config['width'] = $this->config->item('thumb_width');
                    $config['height'] = $this->config->item('thumb_height');
                    $config['new_image'] = "/home/mesacrea/www/cart/images/products/2-image.jpg";
                    
                    $this->load->library('image_lib', $config);
    
                    if ( ! $this->image_lib->resize())
                    {
                    echo "Image 2 errors:".$this->image_lib->display_errors()."<br>";
                    }
                    $this->image_lib->clear();

This returns the following error for the second image:

Code:
Your server does not support the GD function required to process this type of image.

The first image is created fine.

Does anyone have an idea why this is happening or suggestions on how to process multiple images correctly? Help would be appreciated.


Messages In This Thread
Can't process more than one image. - by El Forum - 05-23-2010, 01:58 PM
Can't process more than one image. - by El Forum - 05-23-2010, 03:31 PM
Can't process more than one image. - by El Forum - 05-24-2010, 05:37 AM
Can't process more than one image. - by El Forum - 05-24-2010, 09:56 AM
Can't process more than one image. - by El Forum - 12-09-2010, 04:00 PM
Can't process more than one image. - by El Forum - 12-09-2010, 04:32 PM
Can't process more than one image. - by El Forum - 12-09-2010, 05:11 PM
Can't process more than one image. - by El Forum - 12-09-2010, 07:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB