clear() function in Image Manipulation Class |
[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? |
Welcome Guest, Not a member yet? Register Sign In |