mirror of
https://github.com/lovell/sharp.git
synced 2025-12-18 23:05:04 +01:00
Add Magic Kernel Sharp (no relation) to resizing kernels
This commit is contained in:
2
lib/index.d.ts
vendored
2
lib/index.d.ts
vendored
@@ -1729,6 +1729,8 @@ declare namespace sharp {
|
||||
mitchell: 'mitchell';
|
||||
lanczos2: 'lanczos2';
|
||||
lanczos3: 'lanczos3';
|
||||
mks2013: 'mks2013';
|
||||
mks2021: 'mks2021';
|
||||
}
|
||||
|
||||
interface PresetEnum {
|
||||
|
||||
@@ -150,6 +150,8 @@ function isResizeExpected (options) {
|
||||
* - `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`.
|
||||
|
||||
Reference in New Issue
Block a user