weserv / images

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).
https://wsrv.nl/
BSD 3-Clause "New" or "Revised" License
1.84k stars 187 forks source link

Docs missing range of values for `sharpen` parameter #357

Closed DH-at-PF closed 3 months ago

DH-at-PF commented 1 year ago

The example shows 3 but there is no range defined.

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

kleisauke commented 1 year ago

sharp needs to be in the range of 0.000001 - 10000. https://github.com/weserv/images/blob/03684dc35801188ef12feed5219daf9da4b4c919/src/api/processors/sharpen.cpp#L13-L21

And sharpf and sharpj needs to be in the range of 0 - 10000. https://github.com/weserv/images/blob/03684dc35801188ef12feed5219daf9da4b4c919/src/api/processors/sharpen.cpp#L35-L53

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 commented 1 year ago

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

kleisauke commented 3 months ago

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