mirror of
https://github.com/lovell/sharp.git
synced 2025-07-10 11:00:14 +02:00
Only use gaussian blur for non-linear interpolators Improves performance of bilinear by ~15% Add liborc to the packaged build to improve bicubic perf Add examples of the various interpolation methods Add bilinear vs bicubic to perf tests
49 lines
1.1 KiB
Markdown
49 lines
1.1 KiB
Markdown
# Interpolators
|
|
|
|
[Photo](https://www.flickr.com/photos/aotaro/21978966091) by
|
|
[aotaro](https://www.flickr.com/photos/aotaro/) is licensed under
|
|
[CC BY 2.0](https://creativecommons.org/licenses/by/2.0/).
|
|
|
|
The following examples take the 4608x3072px original image
|
|
and resize to 480x320px using various interpolators.
|
|
|
|
To fetch the original 4608x3072px image and
|
|
generate the interpolator sample images:
|
|
|
|
```sh
|
|
curl -O https://farm6.staticflickr.com/5682/21978966091_b421afe866_o.jpg
|
|
node generate.js
|
|
```
|
|
|
|
## Nearest neighbour
|
|
|
|

|
|
|
|
## Bilinear
|
|
|
|

|
|
|
|
## Bicubic
|
|
|
|

|
|
|
|
## Locally bounded bicubic
|
|
|
|

|
|
|
|
## Vertex-split quadratic b-splines (VSQBS)
|
|
|
|

|
|
|
|
## Nohalo
|
|
|
|

|
|
|
|
## GraphicsMagick
|
|
|
|

|
|
|
|
```sh
|
|
gm convert 21978966091_b421afe866_o.jpg -resize 480x320^ -gravity center -extent 480x320 -quality 95 -strip -define jpeg:optimize-coding=true gm.jpg
|
|
```
|