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

Docs missing range of values for sharpen parameter #357

Closed
DH-at-PF opened this issue Sep 27, 2022 · 3 comments
Closed

Docs missing range of values for sharpen parameter #357

DH-at-PF opened this issue Sep 27, 2022 · 3 comments
Labels
completed Feature or request has been completed documentation Improvements or additions to documentation

Comments

@DH-at-PF
Copy link

The example shows 3 but there is no range defined.

https://images.weserv.nl/docs/adjustment.html#sharpen

@kleisauke kleisauke added the documentation Improvements or additions to documentation label Nov 17, 2022
@kleisauke
Copy link
Member

sharp needs to be in the range of 0.000001 - 10000.

// Sigma of gaussian
auto sigma = query_->get_if<float>(
"sharp",
[](float s) {
// Sigma needs to be in range of
// 0.000001 - 10000
return s >= 0.000001 && s <= 10000;
},
-1.0F);

And sharpf and sharpj needs to be in the range of 0 - 10000.

// Slope for flat areas
auto flat = query_->get_if<float>(
"sharpf",
[](float f) {
// Slope for flat areas needs to
// be in range of 0 - 10000
return f >= 0 && f <= 10000;
},
1.0F);
// Slope for jaggy areas
auto jagged = query_->get_if<float>(
"sharpj",
[](float j) {
// Slope for jaggy areas needs
// to be in range of 0 - 10000
return j >= 0 && j <= 10000;
},
2.0F);

Though, the last two could possibly be increased to a million (1×106), since libvips allows that.
https://github.com/libvips/libvips/blob/e24cee4e224af32d85ab2fd52f57c2482cc87d9c/libvips/convolution/sharpen.c#L356-L368

I'll look into mentioning this on the website.

@kleisauke kleisauke added the started This issue is being worked on label Jun 30, 2023
@kleisauke
Copy link
Member

Commit a82438c updates the maximum values of the sharpen operation, documentation still needs to be updated.

@kleisauke kleisauke added completed Feature or request has been completed and removed started This issue is being worked on labels Mar 23, 2024
@kleisauke
Copy link
Member

Documentation has been updated.
https://wsrv.nl/docs/adjustment.html#sharpen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed Feature or request has been completed documentation Improvements or additions to documentation
Development

No branches or pull requests

2 participants