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

Scale filter and Downscale and Upscale as derivatives, with a new feature #773

Merged
merged 3 commits into from
Aug 29, 2016
Merged

Scale filter and Downscale and Upscale as derivatives, with a new feature #773

merged 3 commits into from
Aug 29, 2016

Conversation

deviprsd
Copy link
Contributor

@deviprsd deviprsd commented Aug 17, 2016

Like I suggested in #770 Creating a new filter scale and deriving upscale and downscale from it will be much clear. Other than that, there are new options like by or to depending upon filter where a relative ratio or absolute ratio respectively can be set to up or down scale the image. For example,

filters:
    downscale: { max: [50, 70] } #or { by: 0.6 } -> Downscales to 40%
    upscale: { min: [200,null] } #or { by: 0.7 } -> Upscales to 170%
    scale: { dim: [600,750] } #or { to: 1.56 } -> Upscales to 156% | { to: 0.66 } -> Downscales to 66%

Though relative_resize has a scale method, the scale filter is more flexible than the latter.

@deviprsd deviprsd changed the title Scale filter and Downscale and Upscale as derivatives Scale filter and Downscale and Upscale as derivatives, with a new option Aug 17, 2016
@deviprsd deviprsd changed the title Scale filter and Downscale and Upscale as derivatives, with a new option Scale filter and Downscale and Upscale as derivatives, with a new feature Aug 17, 2016
@lsmith77
Copy link
Contributor

can you update the docs as well?

@lsmith77 lsmith77 added the State: Reviewing This item is being reviewed to determine if it should be accepted. label Aug 19, 2016
@alexwilson
Copy link
Collaborator

Looks way nicer!

@deviprsd
Copy link
Contributor Author

After giving tests a good look, I don't think new tests are required. If upscale and downscale work, the scale should be assumed to work.

@lsmith77
Copy link
Contributor

thx

@lsmith77 lsmith77 merged commit 655917b into liip:master Aug 29, 2016
@lsmith77 lsmith77 removed the State: Reviewing This item is being reviewed to determine if it should be accepted. label Aug 29, 2016
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