Welcome Guest, Not a member yet? Register   Sign In
multiple image resize
#1

[eluser]syntax error[/eluser]
Hi There

I am experiencing some inconsistency with regards to multiple image manipulation.
I offer my users a gallery with their user account, where they can upload multiple images.

They have the option of uploading multiple images in one go. My programming approach is to firstly upload all the images, then loop through the uploaded images creating thumbnails and resizing them. For the most part this logic works fine, but it seems randomly an image will not get resized.

I was wondering if there are any full-proof methods to ensure that ALL images are resized correctly using the CI image lib.

Any suggestions would be greatly appreciated.
Thank you.
#2

[eluser]Michael Wales[/eluser]
We noticed the same in a project we were working on. Make sure you always unset() the configuration array at the beginning of the loop and define the '_thumb' appendage (even if you are using the default).

That fixed the bugs for us.
#3

[eluser]StevenW721[/eluser]
I know it's a little late, but for the sake of others that come across this in a search I felt I should also comment.

There's a built in function in the Image Manipulation Class that resets all of the values used when processing an image. Using that and then reinitializing the config should do the trick

Code:
$this->image_lib->clear();
$this->image_lib->initialize($config);

Might make things a little easier than doing it manually. Found this at http://ellislab.com/forums/viewthread/53387/




Theme © iAndrew 2016 - Forum software by © MyBB