Welcome Guest, Not a member yet? Register   Sign In
Image Manipulation (particularly resize) works for some images and throws 500 error for others.
#1

[eluser]Unknown[/eluser]
Hi All,

I'm generally the last one to resort to forums for assistance, but a week into this and I'm nowhere.

When I upload some photos, all are uploaded properly/correctly, but when I request a resize using the standard/basic code found as example on this site, it fails with certain images. I've tried this both on my local server with memory cranked up, as well as on a dedicated box with everything maxed out and within the "cloud" on rackspace.

I don't believe that it's a size issue as it works with some other images that are larger than these. For reference, here is the code I'm using. As you can see, I've tried both gd2 and ImageMagick on all environments with the same outcome.

Code:
//   $img_config['image_library'] = 'ImageMagick';
   $img_config['image_library'] = 'gd2';
   $img_config['source_image'] = '/Users/ConceptsGroup/Sites/EXAMPLE.com/trunk/system/static/uploads/example.JPG';
   $img_config['new_image'] = '/Users/ConceptsGroup/Sites/EXAMPLE.com/trunk/system/static/uploads/th_example.JPG';
   $img_config['maintain_ratio'] = TRUE;
   $img_config['width']  = 200;
   $img_config['height'] = 200;
   $this->load->library('image_lib', $img_config);
   if (!$this->image_lib->resize()){
    echo $this->image_lib->display_errors();
   }

As for the images that aren't working with the above code, here are some links (each ~4MB). Apparently attachments aren't allowed on this forum:
http://www.chadhorn.com/resources/DSC02877.JPG
http://www.chadhorn.com/resources/DSC02878.JPG
http://www.chadhorn.com/resources/DSC02880.JPG
http://www.chadhorn.com/resources/DSC02894.JPG


Here are a few images that DO work which are around the same filesize and dimensions:
http://www.chadhorn.com/resources/IMG_0721.JPG
http://www.chadhorn.com/resources/IMG_0722.JPG
http://www.chadhorn.com/resources/IMG_0723.JPG

Also, nothing is being thrown in the logs as no working or failing. Any help or insight is appreciated!!




Theme © iAndrew 2016 - Forum software by © MyBB