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

Simplify passing unsharp opions #3

Closed
puzrin opened this issue Jul 10, 2020 · 1 comment
Closed

Simplify passing unsharp opions #3

puzrin opened this issue Jul 10, 2020 · 1 comment

Comments

@puzrin
Copy link
Member

puzrin commented Jul 10, 2020

Currently users are expeced to modify processing with ease. But probably passing unsharp options need something special.

At first glance, possible alternatives are:

  • pass unsharp params the same way as { max: ... }
    • need to limit list of allowed params (currently unsharpAmount, unsharpRadius, unsharpThreshold).
  • pass unsharp params as { max: ..., pica_opts: ... } - separate object to merge on pica call.
    • if user doesn't knows about pica, this looks unnatural.
  • suggest to pass pica into construcor with overrien .resize()
    • mad science :)

Additional quesions:

  • do we need to pass pica's alpha? It's logic is hardcoded now. Can be changed with _.transform() override only.
  • do we need to pass jpeg quality option? Can be changed with .toBlob() override, not a big deal.
@puzrin
Copy link
Member Author

puzrin commented Jul 11, 2020

4b11846

@puzrin puzrin closed this as completed Jul 11, 2020
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