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

Introduce "auto-limit" option instead of setting "quality" to "auto" #281

Closed
rosell-dk opened this issue May 12, 2021 · 1 comment
Closed
Assignees

Comments

@rosell-dk
Copy link
Owner

Current state of affairs:
quality: Can be a number (0-100) or "auto".
max-quality: Only relevant when "quality" is set to "auto".
default-quality: To be used when quality detection isn't working

Proposed state of affairs:
quality: A number (0-100)
auto-limit: Boolean. If set, and quality detection is working, quality will be limited so it does not exceed that of the jpeg.

Pros:

  • It seems more intuitively comprehensible.
  • It reduces the number of related options with one.
  • Quality becomes a less complex type.

Cons:

  • Users must adopt to the change.

It should made such that the old options still work, but the library informs that they are deprecated.

@rosell-dk rosell-dk added this to the 2.6.0 milestone May 12, 2021
@rosell-dk rosell-dk self-assigned this May 12, 2021
@rosell-dk
Copy link
Owner Author

Mapping from old options to new options:
quality: "auto", max-quality: 85, default-quality: 75
becomes: quality: 85, auto-limit: true

quality: 80
becomes: quality: 80, auto-limit: false

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

No branches or pull requests

1 participant