-
Notifications
You must be signed in to change notification settings - Fork 842
Filter Watermark - allow h_ratio and w_ratio as a real number #1701
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
base: master
Are you sure you want to change the base?
Conversation
|
This PR is stale because it has been open 60 days with no activity. Remove the stale label or add a comment, or this PR will be closed in 30 days. You can always re-open if you feel this is something we should still keep working on. Tag @heynemann for more information. |
Hey @heynemann I think this patch is useful. |
This PR is stale because it has been open 60 days with no activity. Remove the stale label or add a comment, or this PR will be closed in 30 days. You can always re-open if you feel this is something we should still keep working on. Tag @heynemann for more information. |
Pull Request Test Coverage Report for Build 15068229951Details
💛 - Coveralls |
|
Hey @asokani, thank you for your interest in contributing to Thumbor! Could you please explain this regex? It seems a bit like magic to me. Additionally, we should update the documentation for the watermark filter with this new use case. The source code for it is here: https://github.com/thumbor/thumbor/blob/master/docs/watermark.rst |
In order to set the exact size of the watermark, I need to have the percentage value as a real number. There is no reason not to. This is backward compatible
a70e951
to
4e0ebff
Compare
|
Hello @RaphaelVRossi. Thanks for asking. The regex comes straight from https://github.com/thumbor/thumbor/blob/master/thumbor/filters/__init__.py#L132 I've also updated the docs. I explicitly pointed out that percentages can be real numbers. In fact - percentages are ALWAYS real numbers. I don't know why there was an artificial restriction to only whole integers. That never made sense. |
|
In order to set the exact size of the watermark, I need to have the percentage value as a real number. There is no reason not to. This is backward compatible