-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added PasteFilterLoader #95
Conversation
list($x, $y) = $options['start']; | ||
$destImage = $this->imagine->open($this->rootPath.'/../'.$options['image']); | ||
|
||
$filter = new Paste($destImage, new Point($x, $y)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can jut call $image->paste(), without using an extra filter object
Actually, looks like you misunderstood the interface. You need to prepare a filter in filter loader, not apply it, but just return it. In your case, you should open image that is specified in the options and return paste filter instance passing that image and point in constructor |
Looks like you are submitting something for a different imagine bundle, configuration is not what this bundle expects |
Whoops, looks like this code was intended for LiipImagineBundle which does return the image. Are there any real benefits to using LiipImagineBundle over AvalancheImagineBundle? |
I don't understand your question, you clearly picked LiipImagineBundle for some reason :) |
Was searching knpbundles for something to scale images on the fly (without prior knowledge of Imagine). Stumbled on LiipImagineBundle, read through the documentation and examples and it seemed to fit my requirements perfectly. Comparing the two, they seem largely similar (LiipImagineBundle being a fork and all). LiipImagineBundle claims extensibility as the reason for it's existence but I'm curious how exactly it differs. Also wondering if FilterLoaders are incompatible by design. |
My subjective summary would be that AvalancheImagineBundle is the minimalistic core to build on top of |
Ah, I found the refactoring debate here: #25 |
Update composer.json
Added a filter loader for the 'Paste' filter. I really think there ought to be loaders for all the in-built Imagine filters so everything works out the box.
Example configuration for adding a watermark to an image:
P.S. bundle is a life-saver! Thx!