Skip to content
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 background_image filter #319

Merged
merged 1 commit into from
Feb 7, 2014
Merged

Conversation

digitalkaoz
Copy link
Contributor

tweaked the background filter:

The background filter

The background filter can now create a background-image with dimensions and color, default is white (#FFF). where you can put other images/filters ontop

Configuration looks like this:

liip_imagine:
    filter_sets:
        my_thumb:
            filters:
                background: { size: [1026, 684], color: '#fff' }

*
* @author Robert Schönthal <robert.schoenthal@sinnerschrader.com>
*/
class BackgroundImageFilterLoader implements LoaderInterface
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference from BackgroundFilterLoader which we already have?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it would be better to impr exist one.

@digitalkaoz
Copy link
Contributor Author

ok merged it with the default background filter

$size = $image->getSize();

if (isset($options['size'])) {
list($w, $h) = $options['size'];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would personally prefer long var names.

@makasim
Copy link
Collaborator

makasim commented Feb 6, 2014

looks good to me, is it possible to add a test?

@digitalkaoz
Copy link
Contributor Author

ok fixed the cosmetics, i dont have written a test because there arent any FilterTests at all ;)

@@ -141,6 +141,7 @@
<tag name="liip_imagine.filter.loader" loader="crop" />
</service>


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line isn't required.

@havvg
Copy link
Contributor

havvg commented Feb 7, 2014

Minor tweaks and squash, then it's good to go :-)

@havvg havvg added this to the v1.0.0 milestone Feb 7, 2014
@digitalkaoz
Copy link
Contributor Author

done

havvg added a commit that referenced this pull request Feb 7, 2014
@havvg havvg merged commit 142d30a into liip:master Feb 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants