Add Magic Kernel Sharp (no relation) to resizing kernels

This commit is contained in:
Lovell Fuller
2025-06-15 12:53:10 +01:00
parent 8669fbc936
commit 9392b8702b
5 changed files with 10 additions and 0 deletions

View File

@@ -38,6 +38,8 @@ Possible downsizing kernels are:
- `mitchell`: Use a [Mitchell-Netravali spline](https://www.cs.utexas.edu/~fussell/courses/cs384g-fall2013/lectures/mitchell/Mitchell.pdf).
- `lanczos2`: Use a [Lanczos kernel](https://en.wikipedia.org/wiki/Lanczos_resampling#Lanczos_kernel) with `a=2`.
- `lanczos3`: Use a Lanczos kernel with `a=3` (the default).
- `mks2013`: Use a [Magic Kernel Sharp](https://johncostella.com/magic/mks.pdf) 2013 kernel, as adopted by Facebook.
- `mks2021`: Use a Magic Kernel Sharp 2021 kernel, with more accurate (reduced) sharpening than the 2013 version.
When upsampling, these kernels map to `nearest`, `linear` and `cubic` interpolators.
Downsampling kernels without a matching upsampling interpolator map to `cubic`.

View File

@@ -10,6 +10,8 @@ Requires libvips v8.17.0
* Upgrade to libvips v8.17.0 for upstream bug fixes.
* Add "Magic Kernel Sharp" (no relation) to resizing kernels.
* Expose JPEG 2000 `oneshot` decoder option.
[#4262](https://github.com/lovell/sharp/pull/4262)
[@mbklein](https://github.com/mbklein)