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

Allow gravity to be set on resize_to_fill #17

Merged
merged 1 commit into from
Jun 15, 2016

Conversation

nitsujw
Copy link
Contributor

@nitsujw nitsujw commented Jun 14, 2016

When using resize_to_fill this allows the ability to set the gravity for the crop

@@ -30,12 +30,16 @@ Thumbnailing:

# Resize to fill
open("input.jpg") |> resize_to_fill("450x300") |> save

# Resize to fill with gravity
open("input.jpg") |> resize_to_fill("450x300", gravity: "Center") |> save
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I'd expect, for consistency with the rest of the API:

open("input.jpg") |> resize_to_fill("450x300") |> gravity("Center") |> save

So the extra resize_to_fill/3 is kind of redundant.

@nitsujw
Copy link
Contributor Author

nitsujw commented Jun 15, 2016

@talklittle yup good point - fixed

@talklittle talklittle merged commit 8a65929 into elixir-mogrify:master Jun 15, 2016
@talklittle
Copy link
Collaborator

@nitsujw Very cool. Thank you!

@nitsujw
Copy link
Contributor Author

nitsujw commented Jun 15, 2016

@talklittle thank you for the extremely fast response :)

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.

2 participants