Image_moo will resize but not rotate (without errors) [SOLVED] |
[eluser]machouinard[/eluser]
I'm trying to use image_moo to rotate images according their EXIF ORIENTATION tag. Here's the code: Code: private function __fix_rotation($image){ Code: A PHP Error was encountered If I change it from rotate(270) to resize(500, 500) it works just fine. Can anyone see a flaw in the code here? I'm stumped. Thanks, Mark
[eluser]vbsaltydog[/eluser]
Why not just use the CI image library? http://ellislab.com/codeigniter/user-gui...e_lib.html
[eluser]Mat-Moo[/eluser]
Sounds like the image is not being loaded, try and use Code: if($this->image_moo->error) print $this->image_moo->display_errors();. Also guessing that image-moo is loaded somewhere else...
[eluser]machouinard[/eluser]
Guess I left out the part about the rotation actually working despite the errors. Blame it 30 some hours without sleep. So yes, the image is being loaded. It's even being rotated. I just can't figure out where the errors are coming from. I've checked again and again, and image_moo is being loaded only once. Currently in autoload.php, but I've also tried loading it in the function. Makes no difference where it's loaded. I'm using image_moo in only two functions. First to rotate the image based on the ORIENTATION tag (above), then to create a thumbnail Code: function make_thumb($file_name, $image){ I've replaced image_moo.php with a fresh copy, but no change. And I assume you meant Code: if($this->image_moo->errors) I'm sure it's something ridiculously simple I'm missing, I'm just not seeing it. I have a nearly identical situation on another site and I'm getting no errors there, so I know it should work.
[eluser]machouinard[/eluser]
Thanks for the help, Mat-Moo! For anyone else who might find themselves struggling with this: image_moo v1.01 there's an extra $ on line 670 Code: $col = $this->_html2rgb($$this->background_colour); And vbsaltydog, I guess I just prefer to use image_moo. In my experience it's much cleaner and more versatile. Vive le image_moo! |
Welcome Guest, Not a member yet? Register Sign In |