Why is image cropping so hard? |
[eluser]nuwanda[/eluser]
I've been using the CI image lib. No worries resizing, it's just fine. But cropping? I just can't make it work. Code: $config['x_axis'] = 100; Now, that code should reference a block 100 x 100, starting 100 in from the left (x) and 100 down from the top (y). Right? But no, I get an image that varies depending on the source image. One dimension is correct, but the other appears to vary depending on the source. I'd kill for a simple example of a crop operation.
[eluser]richthegeek[/eluser]
Try just not bothering with the CI image lib... PHP GD's imagecopyresized/imagecopyresampled is very easy to implement.
[eluser]nuwanda[/eluser]
[quote author="richthegeek" date="1286279654"]Try just not bothering with the CI image lib... PHP GD's imagecopyresized/imagecopyresampled is very easy to implement.[/quote] Sure, but it's kinda weird that it doesn't perform as expected.
[eluser]Mat-Moo[/eluser]
Try out my image_moo library, got easy crop built in
[eluser]nuwanda[/eluser]
[quote author="Cshamoh" date="1286294850"]set aspect_ratio setting to false [/quote] Well, works perfectly now! The $config['maintain_ratio'] defaults to true, so it must be set. Thanks!
[eluser]fedeisas[/eluser]
I've always dreamed of building a CI library to use this: http://odyniec.net/projects/imgareaselect/. It's the only real solution for handling dummy users.
[eluser]Buso[/eluser]
[quote author="fedeisas" date="1286363712"]I've always dreamed of building a CI library to use this: http://odyniec.net/projects/imgareaselect/. It's the only real solution for handling dummy users.[/quote] o.o nice finding
[eluser]nuwanda[/eluser]
[quote author="fedeisas" date="1286363712"]I've always dreamed of building a CI library to use this: http://odyniec.net/projects/imgareaselect/. It's the only real solution for handling dummy users.[/quote] Yeah, I used the great little Jcrop script for that. Great addition for users. |
Welcome Guest, Not a member yet? Register Sign In |