![]() |
clear() function in Image Manipulation Class - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: clear() function in Image Manipulation Class (/showthread.php?tid=18557) |
clear() function in Image Manipulation Class - El Forum - 05-10-2009 [eluser]verisof[/eluser] Hi, maybe you can explain this, but when I read "The clear function resets all of the values used when processing an image." in the user guide, I suppose that also width and height paramaters would be reseted. For example, I upload an image, than resize it three times (there will be 3 copies in different sizes finally) and crop one of them. When resizing the last one, even though I use clear() function and pass configuration array without 'height' element in it to initialize() function, the height parameter has the value from the previous loop and it's resized incorrectly. I solved it by adding one line of code to the definition of clear() fnction, so it looks like this now: Code: function clear() I haven't looked deeply if any other properties are skipped during clearing, so this is just for height and width. Now I ask - was this (for some reason I would like to hear) skipped in clear() function intentionally? Or is this a bug in clear() function? |