Crop 125px Square From Center |
[eluser]machouinard[/eluser]
I'm trying to crop a 125px square from the center of an image. Is there a way to provide the dimensions to have the crop done in one method? I've tried cropping, then flipping and rotating and cropping some more, then rotating back to the original position. I can't seem to get the crop area right, not to mention that's a lot of code for something I thought a framework was supposed to make easier. I'm trying to redo a site I built before I even knew about frameworks and would like to use CI, but in this instance it just seems like more work. Is there an easier way to do this in CI? Here is how I am currently getting the cropped area: Code: function _crop_Image($source, $cropped) { (Much help with above code came from Adam) Anything helpful anyone has to offer would be greatly appreciated. Thanks, Mark EDIT: In case anyone noticed, I had to change Code: if ($ext == "gif"){ Code: if ($ext == ".gif"){ |
Welcome Guest, Not a member yet? Register Sign In |