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

Let the {% adjust %} template tag take unspecified kwargs #4

Closed
melinath opened this issue Mar 6, 2012 · 1 comment
Closed

Let the {% adjust %} template tag take unspecified kwargs #4

melinath opened this issue Mar 6, 2012 · 1 comment

Comments

@melinath
Copy link
Owner

melinath commented Mar 6, 2012

Right now, all the methods we can apply to images take the same kwargs. This really doesn't make any sense.

For example, crop accepts max_width and max_height, but these have the exactly the same effect as width and height. It would make more sense to just not have them. Instead, crop could take kwargs that force an x or y offset instead of letting one be calculated (though I don't know that would be a good idea.)

Meanwhile for fit those kwargs have a different effect, but only if width or height is undefined. Really, it would make more sense to just allow width and height, but specify that one or both dimensions are loose - i.e. whether the image should be expanded to fit that dimension as best as possible or not.

@melinath
Copy link
Owner Author

Possible syntaxes:

{% adjust <image> <adjustment> <key>=<value> ... <adjustment> <key>=<value> [as <varname> ] %}
{% adjust <image> [lookup] as <varname> %}
    {% adjustment <name> <key>=<value> ... %}
    ....
{% endadjust %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant