fast_image_resize 3.0.1

Library for fast image resizing with using of SIMD instructions
Documentation
<!-- introduction start -->
## Benchmarks of fast_image_resize crate for Wasm32 architecture

Environment:

- CPU: AMD Ryzen 9 5950X
- RAM: DDR4 3800 MHz
- Ubuntu 22.04 (linux 6.2.0)
- Rust 1.75.0
- criterion = "0.5.1"
- fast_image_resize = "3.0.0"
- wasmtime = "16.0.0"


Other libraries used to compare of resizing speed:

- image = "0.24.7" (<https://crates.io/crates/image>)
- resize = "0.8.3" (<https://crates.io/crates/resize>)


Resize algorithms:

- Nearest
- Box - convolution with minimal kernel size 1x1 px
- Bilinear - convolution with minimal kernel size 2x2 px
- Bicubic (CatmullRom) - convolution with minimal kernel size 4x4 px
- Lanczos3 - convolution with minimal kernel size 6x6 px
<!-- introduction end -->

<!-- bench_compare_rgb start -->
### Resize RGB8 image (U8x3) 4928x3279 => 852x567

Pipeline:

`src_image => resize => dst_image`

- Source image [nasa-4928x3279.png]https://github.com/Cykooz/fast_image_resize/blob/main/data/nasa-4928x3279.png
- Numbers in table is mean duration of image resizing in milliseconds.

|             | Nearest |  Box  | Bilinear | Bicubic | Lanczos3 |
|-------------|:-------:|:-----:|:--------:|:-------:|:--------:|
| image       |  19.06  |   -   |  99.24   | 180.42  |  264.28  |
| resize      |    -    | 33.91 |  60.04   | 114.44  |  167.43  |
| fir rust    |  0.38   | 45.67 |  81.65   | 155.12  |  228.96  |
| fir simd128 |  0.38   | 5.34  |   7.07   |  12.27  |  18.58   |
<!-- bench_compare_rgb end -->

<!-- bench_compare_rgba start -->
### Resize RGBA8 image (U8x4) 4928x3279 => 852x567

Pipeline:

`src_image => multiply by alpha => resize => divide by alpha => dst_image`

- Source image
  [nasa-4928x3279-rgba.png]https://github.com/Cykooz/fast_image_resize/blob/main/data/nasa-4928x3279-rgba.png
- Numbers in table is mean duration of image resizing in milliseconds.
- The `image` crate does not support multiplying and dividing by alpha channel.

|             | Nearest |  Box   | Bilinear | Bicubic | Lanczos3 |
|-------------|:-------:|:------:|:--------:|:-------:|:--------:|
| resize      |    -    | 40.06  |  73.00   | 138.37  |  203.32  |
| fir rust    |  0.25   | 100.39 |  146.20  | 239.29  |  332.48  |
| fir simd128 |  0.25   | 12.04  |  14.62   |  21.49  |  29.35   |
<!-- bench_compare_rgba end -->

<!-- bench_compare_l start -->
### Resize L8 image (U8) 4928x3279 => 852x567

Pipeline:

`src_image => resize => dst_image`

- Source image [nasa-4928x3279.png]https://github.com/Cykooz/fast_image_resize/blob/main/data/nasa-4928x3279.png
  has converted into grayscale image with one byte per pixel.
- Numbers in table is mean duration of image resizing in milliseconds.

|             | Nearest |  Box  | Bilinear | Bicubic | Lanczos3 |
|-------------|:-------:|:-----:|:--------:|:-------:|:--------:|
| image       |  17.07  |   -   |  80.15   | 142.65  |  205.30  |
| resize      |    -    | 18.11 |  28.94   |  52.80  |  76.84   |
| fir rust    |  0.21   | 15.75 |  27.82   |  51.37  |  76.51   |
| fir simd128 |  0.21   | 2.56  |   3.00   |  4.51   |   7.31   |
<!-- bench_compare_l end -->

<!-- bench_compare_la start -->
### Resize LA8 image (U8x2) 4928x3279 => 852x567

Pipeline:

`src_image => multiply by alpha => resize => divide by alpha => dst_image`

- Source image
  [nasa-4928x3279-rgba.png]https://github.com/Cykooz/fast_image_resize/blob/main/data/nasa-4928x3279-rgba.png
  has converted into grayscale image with alpha channel (two bytes per pixel).
- Numbers in table is mean duration of image resizing in milliseconds.
- The `image` crate does not support multiplying and dividing by alpha channel.
- The `resize` crate does not support this pixel format.

|             | Nearest |  Box  | Bilinear | Bicubic | Lanczos3 |
|-------------|:-------:|:-----:|:--------:|:-------:|:--------:|
| fir rust    |  0.19   | 52.58 |  80.84   | 137.68  |  198.83  |
| fir simd128 |  0.19   | 7.52  |   8.69   |  11.61  |  16.30   |
<!-- bench_compare_la end -->

<!-- bench_compare_rgb16 start -->
### Resize RGB16 image (U16x3) 4928x3279 => 852x567

Pipeline:

`src_image => resize => dst_image`

- Source image [nasa-4928x3279.png]https://github.com/Cykooz/fast_image_resize/blob/main/data/nasa-4928x3279.png
  has converted into RGB16 image.
- Numbers in table is mean duration of image resizing in milliseconds.

|             | Nearest |  Box  | Bilinear | Bicubic | Lanczos3 |
|-------------|:-------:|:-----:|:--------:|:-------:|:--------:|
| image       |  19.11  |   -   |  96.10   | 173.83  |  252.76  |
| resize      |    -    | 32.49 |  57.32   | 109.01  |  158.75  |
| fir rust    |  0.43   | 40.56 |  62.58   | 109.75  |  155.99  |
| fir simd128 |  0.43   | 33.12 |  52.11   |  89.83  |  129.08  |
<!-- bench_compare_rgb16 end -->

<!-- bench_compare_rgba16 start -->
### Resize RGBA16 image (U16x4) 4928x3279 => 852x567

Pipeline:

`src_image => multiply by alpha => resize => divide by alpha => dst_image`

- Source image
  [nasa-4928x3279-rgba.png]https://github.com/Cykooz/fast_image_resize/blob/main/data/nasa-4928x3279-rgba.png
- Numbers in table is mean duration of image resizing in milliseconds.
- The `image` crate does not support multiplying and dividing by alpha channel.

|             | Nearest |  Box  | Bilinear | Bicubic | Lanczos3 |
|-------------|:-------:|:-----:|:--------:|:-------:|:--------:|
| resize      |    -    | 40.13 |  74.22   | 140.36  |  207.29  |
| fir rust    |  0.37   | 89.89 |  120.31  | 181.49  |  244.81  |
| fir simd128 |  0.37   | 53.75 |  77.43   | 124.93  |  173.79  |
<!-- bench_compare_rgba16 end -->

<!-- bench_compare_l16 start -->
### Resize L16 image (U16) 4928x3279 => 852x567

Pipeline:

`src_image => resize => dst_image`

- Source image [nasa-4928x3279.png]https://github.com/Cykooz/fast_image_resize/blob/main/data/nasa-4928x3279.png
  has converted into grayscale image with two bytes per pixel.
- Numbers in table is mean duration of image resizing in milliseconds.

|             | Nearest |  Box  | Bilinear | Bicubic | Lanczos3 |
|-------------|:-------:|:-----:|:--------:|:-------:|:--------:|
| image       |  17.48  |   -   |  80.39   | 142.73  |  205.56  |
| resize      |    -    | 18.15 |  29.73   |  54.43  |  78.61   |
| fir rust    |  0.19   | 19.81 |  29.13   |  47.86  |  66.83   |
| fir simd128 |  0.19   | 12.27 |  18.43   |  30.00  |  43.25   |
<!-- bench_compare_l16 end -->

<!-- bench_compare_la16 start -->
### Resize LA16 (luma with alpha channel) image (U16x2) 4928x3279 => 852x567

Pipeline:

`src_image => multiply by alpha => resize => divide by alpha => dst_image`

- Source image
  [nasa-4928x3279-rgba.png]https://github.com/Cykooz/fast_image_resize/blob/main/data/nasa-4928x3279-rgba.png
  has converted into grayscale image with alpha channel (four bytes per pixel).
- Numbers in table is mean duration of image resizing in milliseconds.
- The `image` crate does not support multiplying and dividing by alpha channel.
- The `resize` crate does not support this pixel format.

|             | Nearest |  Box  | Bilinear | Bicubic | Lanczos3 |
|-------------|:-------:|:-----:|:--------:|:-------:|:--------:|
| fir rust    |  0.23   | 50.38 |  68.90   | 106.26  |  143.58  |
| fir simd128 |  0.23   | 30.37 |  42.05   |  67.08  |  93.66   |
<!-- bench_compare_la16 end -->