mirror of
https://github.com/Cykooz/fast_image_resize.git
synced 2026-10-07 17:01:09 +00:00
Updated CHANGELOG with details.
This commit is contained in:
@@ -23,7 +23,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
@@ -51,16 +51,18 @@ jobs:
|
||||
CARGO_TARGET_WASM32_WASIP2_RUNNER: "wasmtime --dir=. --"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Setup `wasmtime`
|
||||
uses: bytecodealliance/actions/wasmtime/setup@v1
|
||||
with:
|
||||
version: "46.0.1"
|
||||
version: "48.0.0"
|
||||
|
||||
- name: Install Rust toolchain and target
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
# 1.95+ have regression in Wasm32 SIMD128 implementation.
|
||||
toolchain: 1.94.1
|
||||
target: wasm32-wasip2
|
||||
cache-on-failure: "true"
|
||||
rustflags: ""
|
||||
@@ -79,7 +81,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v7
|
||||
- name: Install Rust toolchain and target
|
||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
|
||||
+216
-161
@@ -1,11 +1,26 @@
|
||||
## [Unreleased] - ReleaseDate
|
||||
|
||||
### Added
|
||||
|
||||
- Added support of optimisation with the help of `Wasm32 SIMD128` for all `F32`
|
||||
based pixel types ([#61](https://github.com/Cykooz/fast_image_resize/pull/61))
|
||||
|
||||
The convolution accumulation uses the fused `f64x2_relaxed_madd` instruction
|
||||
when the crate is built with the relaxed-simd target feature:
|
||||
```sh
|
||||
RUSTFLAGS="-Ctarget-feature=+relaxed-simd" cargo build --target wasm32-wasip2
|
||||
```
|
||||
This provides an additional 5-10% reduction in `f32` convolution benchmark
|
||||
times.
|
||||
|
||||
## [6.1.0] - 2026-07-21
|
||||
|
||||
### Changed
|
||||
|
||||
- Improved speed of `AVX2` implementation for vertical
|
||||
convolution pass for pixel types based on `u8` components.
|
||||
- Improved speed of `native` implementation for vertical
|
||||
convolution pass for pixel types based on `u16` components.
|
||||
- Improved speed of `AVX2` implementation for vertical convolution pass for
|
||||
pixel types based on `u8` components.
|
||||
- Improved speed of `native` implementation for vertical convolution pass for
|
||||
pixel types based on `u16` components.
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -17,46 +32,46 @@
|
||||
### Added
|
||||
|
||||
- **BREAKING**: Added support of `no_std`
|
||||
environment ([#58](https://github.com/Cykooz/fast_image_resize/issues/58)).
|
||||
To use the crate in a such environment, you must disable
|
||||
default features and enabled the `no_std` feature.
|
||||
environment ([#58](https://github.com/Cykooz/fast_image_resize/issues/58)). To
|
||||
use the crate in such an environment, you must disable default features and
|
||||
enable the `no_std` feature.
|
||||
|
||||
If you already have default features disabled and want to continue
|
||||
using the crate in `std` environment, you have to enable
|
||||
the `std` feature.
|
||||
If you already have default features disabled and want to continue using the
|
||||
crate in `std` environment, you have to enable the `std` feature.
|
||||
|
||||
## [5.6.0] - 2026-01-07 (yanked)
|
||||
|
||||
This version was yanked due to a backwards compatibility break -
|
||||
a new feature `std` was added to the list of default features.
|
||||
This version was yanked due to a backwards compatibility break - a new feature
|
||||
`std` was added to the list of default features.
|
||||
|
||||
## [5.5.0] - 2026-01-02
|
||||
|
||||
### Added
|
||||
|
||||
- Added support of some variants of `ImageBuffer` type
|
||||
from the `image` crate ([#57](https://github.com/Cykooz/fast_image_resize/issues/57)).
|
||||
- Added support of some variants of `ImageBuffer` type from the `image` crate
|
||||
([#57](https://github.com/Cykooz/fast_image_resize/issues/57)).
|
||||
|
||||
## [5.4.0] - 2025-11-28
|
||||
|
||||
### Added
|
||||
|
||||
- Added `bytemuck` feature and implemented some `bytemuck` traits for the `Pixel` type
|
||||
([#56](https://github.com/Cykooz/fast_image_resize/pull/56)).
|
||||
- Added `bytemuck` feature and implemented some `bytemuck` traits for the
|
||||
`Pixel` type ([#56](https://github.com/Cykooz/fast_image_resize/pull/56)).
|
||||
|
||||
## [5.3.0] - 2025-09-02
|
||||
|
||||
### Added
|
||||
|
||||
- Added support for multi-thread image resizing using the `ResizeAlg::Nearest` algorithm.
|
||||
([#54](https://github.com/Cykooz/fast_image_resize/issues/54)).
|
||||
- Added support for multi-thread image resizing using the `ResizeAlg::Nearest`
|
||||
algorithm. ([#54](https://github.com/Cykooz/fast_image_resize/issues/54)).
|
||||
|
||||
## [5.2.2] - 2025-08-29
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed a "divide by zero" error in case of using multithreading to resize images
|
||||
with particular sizes ([#55](https://github.com/Cykooz/fast_image_resize/issues/55)).
|
||||
- Fixed a "divide by zero" error in case of using multithreading to resize
|
||||
images with particular sizes
|
||||
([#55](https://github.com/Cykooz/fast_image_resize/issues/55)).
|
||||
|
||||
## [5.2.1] - 2025-07-27
|
||||
|
||||
@@ -69,16 +84,17 @@ a new feature `std` was added to the list of default features.
|
||||
### Added
|
||||
|
||||
- Added support of `DynamicImage::ImageRgb32F` and `DynamicImage::ImageRgba32F`
|
||||
form the `image` crate ([#50](https://github.com/Cykooz/fast_image_resize/pull/50)).
|
||||
form the `image` crate
|
||||
([#50](https://github.com/Cykooz/fast_image_resize/pull/50)).
|
||||
|
||||
## [5.1.4] - 2025-05-16
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed `SSE4.1` and `AVX2` implementation for dividing image by
|
||||
alpha channel for images with `U16x2` pixels.
|
||||
- Fixed `NEON` implementation for dividing image by
|
||||
alpha channel for images with `U16x2` and `U16x4` pixels .
|
||||
- Fixed `SSE4.1` and `AVX2` implementation for dividing image by alpha channel
|
||||
for images with `U16x2` pixels.
|
||||
- Fixed `NEON` implementation for dividing image by alpha channel for images
|
||||
with `U16x2` and `U16x4` pixels .
|
||||
|
||||
## [5.1.3] - 2025-04-06
|
||||
|
||||
@@ -87,14 +103,16 @@ a new feature `std` was added to the list of default features.
|
||||
- Fixed error in `NEON` implementation of `MulDiv::multiply_alpha()` and
|
||||
`MulDiv::multiply_alpha_inplace()` for `U8x2` pixels
|
||||
([#49](https://github.com/Cykooz/fast_image_resize/issues/49)).
|
||||
- Replaced the internal crate `testing` on the corresponding module in the `tests` directory
|
||||
- Replaced the internal crate `testing` on the corresponding module in the
|
||||
`tests` directory
|
||||
([#48](https://github.com/Cykooz/fast_image_resize/issues/48)).
|
||||
|
||||
## [5.1.2] - 2025-02-16
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed error in implementation of `ImageView::split_by_width()`, `ImageView::split_by_height()`,
|
||||
- Fixed the error in the implementation of `ImageView::split_by_width()`,
|
||||
`ImageView::split_by_height()`,
|
||||
`ImageViewMut::split_by_width_mut()` and `ImageViewMut::split_by_height_mut()`
|
||||
([#46](https://github.com/Cykooz/fast_image_resize/issues/46)).
|
||||
|
||||
@@ -102,7 +120,8 @@ a new feature `std` was added to the list of default features.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed error in implementation of `ImageView::split_by_width()`, `ImageView::split_by_height()`,
|
||||
- Fixed the error in the implementation of `ImageView::split_by_width()`,
|
||||
`ImageView::split_by_height()`,
|
||||
`ImageViewMut::split_by_width_mut()` and `ImageViewMut::split_by_height_mut()`
|
||||
([#43](https://github.com/Cykooz/fast_image_resize/issues/43)).
|
||||
|
||||
@@ -110,43 +129,45 @@ a new feature `std` was added to the list of default features.
|
||||
|
||||
### Changed
|
||||
|
||||
- Improved speed (about 9%) of `SSE4.1` implementation for vertical
|
||||
convolution pass for pixel types based on `u8` components.
|
||||
- Improved speed (about 9%) of `SSE4.1` implementation for vertical convolution
|
||||
pass for pixel types based on `u8`
|
||||
components.
|
||||
|
||||
### Fixed
|
||||
|
||||
- `is_aarch64_feature_detected()` is used now in
|
||||
the `CpuExtensions::is_supported()` method for `aarch64` architecture.
|
||||
- `is_aarch64_feature_detected()` is used now in the
|
||||
`CpuExtensions::is_supported()` method for `aarch64` architecture.
|
||||
|
||||
## [5.0.0] - 2024-10-03
|
||||
|
||||
### Added
|
||||
|
||||
- Added support for multi-thread image processing with the help of `rayon` crate.
|
||||
You should enable `rayon` feature to turn on this behavior.
|
||||
- Added methods to split image in different directions:
|
||||
- Added support for multi-thread image processing with the help of `rayon`
|
||||
crate. You should enable `rayon` feature to turn on this behavior.
|
||||
- Added methods to split the image in different directions:
|
||||
- `ImageView::split_by_height()`
|
||||
- `ImageView::split_by_width()`
|
||||
- `ImageViewMut::split_by_height_mut()`
|
||||
- `ImageViewMut::split_by_width_mut()`
|
||||
|
||||
These methods have default implementation and are used for multi-thread
|
||||
These methods have the default implementation and are used for multi-thread
|
||||
image processing.
|
||||
|
||||
### Changed
|
||||
|
||||
- **BREAKING**: Added supertraits `Send`, `Sync` and `Sized` to the `ImageView` trait.
|
||||
- Optimized convolution algorythm by deleting zero coefficients from start and
|
||||
end of bounds.
|
||||
- **BREAKING**: Added supertraits `Send`, `Sync` and `Sized` to the `ImageView`
|
||||
trait.
|
||||
- Optimized convolution algorythm by deleting zero coefficients from the start
|
||||
and end of bounds.
|
||||
|
||||
## [4.2.3] - 2025-05-16
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed `SSE4.1` and `AVX2` implementation fo dividing image by
|
||||
alpha channel for images with `U16x2` pixels.
|
||||
- Fixed `NEON` implementation for dividing image by
|
||||
alpha channel for images with `U16x2` and `U16x4` pixels.
|
||||
- Fixed `SSE4.1` and `AVX2` implementation fo dividing image by alpha channel
|
||||
for images with `U16x2` pixels.
|
||||
- Fixed `NEON` implementation for dividing image by alpha channel for images
|
||||
with `U16x2` and `U16x4` pixels.
|
||||
|
||||
## [4.2.2] - 2025-04-06
|
||||
|
||||
@@ -168,16 +189,16 @@ a new feature `std` was added to the list of default features.
|
||||
|
||||
- Added new resize algorithm `ResizeAlg::Interpolation` (#32).
|
||||
|
||||
It is like `ResizeAlg::Convolution` but with fixed kernel size.
|
||||
This algorithm can be useful if you want to get a result similar
|
||||
to `OpenCV` (except `INTER_AREA` interpolation).
|
||||
It is like `ResizeAlg::Convolution` but with a fixed kernel size. This
|
||||
algorithm can be useful if you want to get a result similar to `OpenCV`
|
||||
(except `INTER_AREA` interpolation).
|
||||
|
||||
## [4.1.0] - 2024-07-14
|
||||
|
||||
### Added
|
||||
|
||||
- Added support for optimization with help of `SSE4.1` and `AVX2` for
|
||||
the `F32` pixel type.
|
||||
- Added support for optimization with the help of `SSE4.1` and `AVX2` for the
|
||||
`F32` pixel type.
|
||||
- Added support for new pixel types `F32x2`, `F32x3` and `F32x4` with
|
||||
optimizations for `SSE4.1` and `AVX2` (#30).
|
||||
|
||||
@@ -204,41 +225,43 @@ a new feature `std` was added to the list of default features.
|
||||
|
||||
A lot of **breaking changes** have been done in this release:
|
||||
|
||||
- Structures `ImageView` and `ImageViewMut` have been removed. They always
|
||||
did unnecessary memory allocation to store references to image rows.
|
||||
Instead of these structures, the `ImageView` and `ImageViewMut` traits
|
||||
have been added. The crate accepts any image container that provides
|
||||
these traits.
|
||||
- Also, traits `IntoImageView` and `IntoImageViewMut` have been added.
|
||||
They allow you to write runtime adapters to convert your particular
|
||||
image container into something that provides `ImageView`/`ImageViewMut` trait.
|
||||
- Structures `ImageView` and `ImageViewMut` have been removed. They always did
|
||||
unnecessary memory allocation to store references to image rows. Instead of
|
||||
these structures, the `ImageView` and `ImageViewMut` traits have been added.
|
||||
The crate accepts any image container that provides these traits.
|
||||
- Also, traits `IntoImageView` and `IntoImageViewMut` have been added. They
|
||||
allow you to write runtime adapters to convert your particular image container
|
||||
into something that provides `ImageView`/`ImageViewMut` trait.
|
||||
- `Resizer` now has two methods for resize (dynamic and typed):
|
||||
- `resize()` accepts references to `impl IntoImageView` and `impl IntoImageViewMut`;
|
||||
- `resize_typed()` accepts references to `impl ImageView` and `impl ImageViewMut`.
|
||||
- Resize methods also accept the `options` argument.
|
||||
With the help of this argument, you can specify:
|
||||
- `resize()` accepts references to `impl IntoImageView` and
|
||||
`impl IntoImageViewMut`;
|
||||
- `resize_typed()` accepts references to `impl ImageView` and
|
||||
`impl ImageViewMut`.
|
||||
- Resize methods also accept the `options` argument. With the help of this
|
||||
argument, you can specify:
|
||||
- resize algorithm (default: Lanczos3);
|
||||
- how to crop the source image;
|
||||
- whether to multiply the source image by the alpha channel and
|
||||
divide the destination image by the alpha channel.
|
||||
By default, Resizer multiplies and divides by alpha channel
|
||||
images with `U8x2`, `U8x4`, `U16x2` and `U16x4` pixels.
|
||||
- whether to multiply the source image by the alpha channel and divide the
|
||||
destination image by the alpha channel. By default, Resizer multiplies and
|
||||
divides by alpha channel images with `U8x2`, `U8x4`, `U16x2` and `U16x4`
|
||||
pixels.
|
||||
- Argument `resize_alg` was removed from `Resizer::new()` method, use
|
||||
`options` argument of methods to resize instead.
|
||||
- The `MulDiv` implementation has been changed in the same way as `Resizer`.
|
||||
It now has two versions of each method: dynamic and typed.
|
||||
- Type of image dimensions has been changed from `NonZeroU32` into `u32`.
|
||||
Now you can create and use zero-sized images.
|
||||
- `Image` (embedded implementation of image container) moved from root of
|
||||
the crate into module `images`.
|
||||
- Added optional feature "image".
|
||||
It adds implementation of traits `IntoImageView` and `IntoImageViewMut` for the
|
||||
- The `MulDiv` implementation has been changed in the same way as `Resizer`. It
|
||||
now has two versions of each method:
|
||||
dynamic and typed.
|
||||
- Type of image dimensions has been changed from `NonZeroU32` into `u32`. Now
|
||||
you can create and use zero-sized images.
|
||||
- `Image` (embedded implementation of image container) moved from root of the
|
||||
crate into module `images`.
|
||||
- Added optional feature "image". It adds implementation of traits
|
||||
`IntoImageView` and `IntoImageViewMut` for the
|
||||
[DynamicImage](https://docs.rs/image/latest/image/enum.DynamicImage.html) type
|
||||
from the `image` crate. This implementation allows you to use `DynamicImage`
|
||||
instances as arguments for methods of this crate.
|
||||
|
||||
Look at the difference between versions 3 and 4 on example
|
||||
of resizing RGBA8 image from given u8-buffer with pixels-data.
|
||||
Look at the difference between versions 3 and 4 on example of resizing RGBA8
|
||||
image from given u8-buffer with pixels-data.
|
||||
|
||||
3.x version:
|
||||
|
||||
@@ -341,7 +364,7 @@ fn my_resize(
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed error with incorrect cropping of source image.
|
||||
- Fixed the error with incorrect cropping of the source image.
|
||||
|
||||
## [3.0.3] - 2024-02-07
|
||||
|
||||
@@ -353,25 +376,32 @@ fn my_resize(
|
||||
|
||||
### Added
|
||||
|
||||
- Added `Custom` variant for `FilterType` enum and corresponding `Filter` structure.
|
||||
- **BREAKING**: Added a new variant of enum `CropBoxError::WidthOrHeightLessOrEqualToZero`.
|
||||
- Added `Custom` variant for `FilterType` enum and corresponding `Filter`
|
||||
structure.
|
||||
- **BREAKING**: Added a new variant of enum
|
||||
`CropBoxError::WidthOrHeightLessOrEqualToZero`.
|
||||
|
||||
### Changed
|
||||
|
||||
- Slightly improved (about 3%) speed of `AVX2` implementation of `Convolution` trait
|
||||
for `U8x3` and `U8x4` images.
|
||||
- **BREAKING**: Changed internal data type for `U8x4` structure.
|
||||
Now it is `[u8; 4]` instead of `u32`.
|
||||
- Significantly improved (4.5 times on `x86_64`) speed of vertical convolution pass implemented
|
||||
in native Rust for `U8`, `U8x2`, `U8x3` and `U8x4` images.
|
||||
- Changed order of convolution passes for `U8`, `U8x2`, `U8x3` and `U8x4` images.
|
||||
Now a vertical pass is the first and a horizontal pass is the second.
|
||||
- **BREAKING**: Type of the `CropBox` fields has been changed to `f64`. Now you can use
|
||||
fractional size and position of crop box.
|
||||
- **BREAKING**: Type of the `centering` argument of `ImageView::set_crop_box_to_fit_dst_size()`
|
||||
and `DynamicImageView::set_crop_box_to_fit_dst_size()` methods has been changed to `Optional<(f64, f64)>`.
|
||||
- **BREAKING**: The `crop_box` argument of `ImageViewMut::crop()` and `DynamicImageViewMut::crop()`
|
||||
methods has been replaced with separate `left`, `top`, `width` and `height` arguments.
|
||||
- Slightly improved (about 3%) speed of `AVX2` implementation of `Convolution`
|
||||
trait for `U8x3` and `U8x4` images.
|
||||
- **BREAKING**: Changed internal data type for `U8x4` structure. Now it is
|
||||
`[u8; 4]` instead of `u32`.
|
||||
- Significantly improved (4.5 times on `x86_64`) speed of vertical convolution
|
||||
pass implemented in native Rust for `U8`,
|
||||
`U8x2`, `U8x3` and `U8x4` images.
|
||||
- Changed order of convolution passes for `U8`, `U8x2`, `U8x3` and `U8x4`
|
||||
images. Now a vertical pass is the first and a horizontal pass is the second.
|
||||
- **BREAKING**: Type of the `CropBox` fields has been changed to `f64`. Now you
|
||||
can use fractional size and position of crop box.
|
||||
- **BREAKING**: Type of the `centering` argument of
|
||||
`ImageView::set_crop_box_to_fit_dst_size()`
|
||||
and `DynamicImageView::set_crop_box_to_fit_dst_size()` methods has been
|
||||
changed to `Optional<(f64, f64)>`.
|
||||
- **BREAKING**: The `crop_box` argument of `ImageViewMut::crop()` and
|
||||
`DynamicImageViewMut::crop()`
|
||||
methods has been replaced with separate `left`, `top`, `width` and `height`
|
||||
arguments.
|
||||
|
||||
## [2.7.3] - 2023-05-07
|
||||
|
||||
@@ -385,31 +415,33 @@ fn my_resize(
|
||||
|
||||
### Fixed
|
||||
|
||||
- Added using of (read|write)_unaligned for unaligned pointers
|
||||
on `arm64` and `wasm32` architectures.
|
||||
- Added using of (read|write)_unaligned for unaligned pointers on `arm64` and
|
||||
`wasm32` architectures.
|
||||
([#15](https://github.com/Cykooz/fast_image_resize/issues/15)).
|
||||
|
||||
## [2.7.1] - 2023-04-28
|
||||
|
||||
### Fixed
|
||||
|
||||
- Added using of (read|write)_unaligned for unaligned pointers on `x86_64` architecture.
|
||||
([#16](https://github.com/Cykooz/fast_image_resize/pull/16)).
|
||||
- Added using of (read|write)_unaligned for unaligned pointers on `x86_64`
|
||||
architecture. ([#16](https://github.com/Cykooz/fast_image_resize/pull/16)).
|
||||
|
||||
## [2.7.0] - 2023-03-24
|
||||
|
||||
### Added
|
||||
|
||||
- Added method `DynamicImageViewMut::crop()` to create cropped version of `DynamicImageViewMut`
|
||||
- Added method `DynamicImageViewMut::crop()` to create cropped version of
|
||||
`DynamicImageViewMut`
|
||||
([#13](https://github.com/Cykooz/fast_image_resize/issues/13)).
|
||||
- Added method `ImageViewMut::crop()` to create cropped version of `ImageViewMut`.
|
||||
- Added method `ImageViewMut::crop()` to create cropped version of
|
||||
`ImageViewMut`.
|
||||
|
||||
## [2.6.0] - 2023-03-01
|
||||
|
||||
### Crate
|
||||
|
||||
- Slightly improved speed of `Convolution` implementation for `U8x2` images
|
||||
and `Wasm32 SIMD128` instructions.
|
||||
- Slightly improved speed of `Convolution` implementation for `U8x2` images and
|
||||
`Wasm32 SIMD128` instructions.
|
||||
- Method `Image::buffer_mut()` was made public
|
||||
([#14](https://github.com/Cykooz/fast_image_resize/pull/14))
|
||||
|
||||
@@ -417,9 +449,10 @@ fn my_resize(
|
||||
|
||||
### Crate
|
||||
|
||||
- Added support of optimisation with helps of `Wasm32 SIMD128` for
|
||||
all types of images exclude `I32` and `F32`
|
||||
(thanks to @cdmurph32, [#11](https://github.com/Cykooz/fast_image_resize/pull/11)).
|
||||
- Added support of optimisation with the help of `Wasm32 SIMD128` for all types
|
||||
of images exclude `I32` and `F32`
|
||||
(thanks to
|
||||
@cdmurph32, [#11](https://github.com/Cykooz/fast_image_resize/pull/11)).
|
||||
|
||||
### Benchmarks
|
||||
|
||||
@@ -430,32 +463,41 @@ fn my_resize(
|
||||
|
||||
### Crate
|
||||
|
||||
- Slightly improved speed of `MulDiv` implementation for `U8x2`, `U8x4`, `U16x2` and `U16x4` images.
|
||||
- Added optimisation for processing `U16x2` images by `MulDiv` with
|
||||
helps of `NEON SIMD` instructions.
|
||||
- Excluded possibility of unnecessary operations during resize
|
||||
of cropped image by convolution algorithm.
|
||||
- Slightly improved speed of `MulDiv` implementation for `U8x2`, `U8x4`, `U16x2`
|
||||
and `U16x4` images.
|
||||
- Added optimisation for processing `U16x2` images by `MulDiv` with helps of
|
||||
`NEON SIMD` instructions.
|
||||
- Excluded possibility of unnecessary operations during resize of cropped image
|
||||
by convolution algorithm.
|
||||
- Added implementation `From` trait to convert `ImageViewMut` into `ImageView`.
|
||||
- Added implementation `From` trait to convert `DynamicImageViewMut` into `DynamicImageView`.
|
||||
- Added implementation `From` trait to convert `DynamicImageViewMut` into
|
||||
`DynamicImageView`.
|
||||
|
||||
## [2.3.0] - 2022-11-25
|
||||
|
||||
### Crate
|
||||
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of `U16` images.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of `U16x2` images.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of `U16x3` images.
|
||||
- Improved optimisation of convolution with helps of `NEON SIMD` for `U8` images.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of
|
||||
`U16` images.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of
|
||||
`U16x2` images.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of
|
||||
`U16x3` images.
|
||||
- Improved optimisation of convolution with helps of `NEON SIMD` for `U8`
|
||||
images.
|
||||
|
||||
## [2.2.0] - 2022-11-18
|
||||
|
||||
### Crate
|
||||
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of `U8` images.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of `U8x2` images.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of `U8x3` images.
|
||||
- Added optimisation for processing `U8x2` images by `MulDiv` with
|
||||
helps of `NEON SIMD` instructions.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of
|
||||
`U8` images.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of
|
||||
`U8x2` images.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of
|
||||
`U8x3` images.
|
||||
- Added optimisation for processing `U8x2` images by `MulDiv` with helps of
|
||||
`NEON SIMD` instructions.
|
||||
|
||||
## [2.1.0] - 2022-11-11
|
||||
|
||||
@@ -463,13 +505,15 @@ fn my_resize(
|
||||
|
||||
- Added method `CpuExtensions::is_supported(&self)`.
|
||||
- Internals of `PixelComponentMapper` changed to use heap to store its data.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of `U16x4` images.
|
||||
- Added optimisation for processing `U16x4` images by `MulDiv` with
|
||||
helps of `NEON SIMD` instructions.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of
|
||||
`U16x4` images.
|
||||
- Added optimisation for processing `U16x4` images by `MulDiv` with helps of
|
||||
`NEON SIMD` instructions.
|
||||
- Added full optimisation for convolution of `U8` images with helps of
|
||||
`SSE4.1` instructions.
|
||||
- Fixed link to documentation page in `README.md` file.
|
||||
- Fixed error in implementation of `MulDiv::divide_alpha()` and `MulDiv::divide_alpha_inplace()`
|
||||
- Fixed error in implementation of `MulDiv::divide_alpha()` and
|
||||
`MulDiv::divide_alpha_inplace()`
|
||||
for `U16x4` pixels with optimisation with helps of `SSE4.1` and `AVX2`.
|
||||
- Improved optimisation of `MulDiv` with helps of `NEON SIMD` for `U8x4` pixels.
|
||||
|
||||
@@ -483,34 +527,41 @@ fn my_resize(
|
||||
- Trait `Pixel` renamed into `PixelExt` and some its internals changed:
|
||||
- associated type `ComponentsCount` renamed into `CountOfComponents`.
|
||||
- associated type `ComponentCountOfValues` deleted.
|
||||
- associated method `components_count` renamed into `count_of_components`.
|
||||
- associated method `component_count_of_values` renamed into `count_of_component_values`.
|
||||
- associated method `components_count` renamed into
|
||||
`count_of_components`.
|
||||
- associated method `component_count_of_values` renamed into
|
||||
`count_of_component_values`.
|
||||
- All pixel types (`U8`, `U8x2`, ...) replaced by type aliases for new
|
||||
generic structure `Pixel`. Use method `new()` to create
|
||||
instance of one pixel.
|
||||
- Added structure `PixelComponentMapper` that holds tables for mapping values of pixel's
|
||||
components in forward and backward directions.
|
||||
- Added function `create_gamma_22_mapper()` to create instance of `PixelComponentMapper`
|
||||
generic structure `Pixel`. Use method `new()`
|
||||
to create instance of one pixel.
|
||||
- Added structure `PixelComponentMapper` that holds tables for mapping values of
|
||||
pixel's components in forward and backward directions.
|
||||
- Added function `create_gamma_22_mapper()` to create instance of
|
||||
`PixelComponentMapper`
|
||||
that converts images with gamma 2.2 to linear colorspace and back.
|
||||
- Added function `create_srgb_mapper()` to create instance of `PixelComponentMapper`
|
||||
- Added function `create_srgb_mapper()` to create instance of
|
||||
`PixelComponentMapper`
|
||||
that converts images from SRGB colorspace to linear RGB and back.
|
||||
- Added generic structs `ImageView` and `ImageViewMut`.
|
||||
- Added functions `change_type_of_pixel_components` and
|
||||
`change_type_of_pixel_components_dyn` that change type of pixel's
|
||||
components in whole image.
|
||||
`change_type_of_pixel_components_dyn` that change type of pixel's components
|
||||
in whole image.
|
||||
- Added generic trait `IntoPixelComponent<Out: PixelComponent>`.
|
||||
- Added generic structure `Pixel` for create all types of pixels.
|
||||
- Added full support of optimisation with helps of `SSE4.1` for convolution of `U8x3` images.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of `U8x4` images.
|
||||
- Added optimisation for processing `U8x4` images by `MulDiv` with
|
||||
helps of `NEON SIMD` instructions.
|
||||
- Added full support of optimisation with helps of `SSE4.1` for convolution of
|
||||
`U8x3` images.
|
||||
- Added support of optimisation with helps of `NEON SIMD` for convolution of
|
||||
`U8x4` images.
|
||||
- Added optimisation for processing `U8x4` images by `MulDiv` with helps of
|
||||
`NEON SIMD` instructions.
|
||||
|
||||
### Example application
|
||||
|
||||
- Added option `--high_precision` to use `u16` as pixel components
|
||||
for intermediate image representation.
|
||||
- Added converting of source image into linear colorspace before it will be resized.
|
||||
Destination image will be returned into original colorspace before it will be saved.
|
||||
- Added option `--high_precision` to use `u16` as pixel components for
|
||||
intermediate image representation.
|
||||
- Added converting of source image into linear colorspace before it will be
|
||||
resized. Destination image will be returned into original colorspace before it
|
||||
will be saved.
|
||||
|
||||
## [1.0.0] - 2022-07-24
|
||||
|
||||
@@ -518,15 +569,14 @@ fn my_resize(
|
||||
|
||||
## [0.9.7] - 2022-07-14
|
||||
|
||||
- Fixed resizing when the destination image has the same dimensions
|
||||
as the source image
|
||||
([#9](https://github.com/Cykooz/fast_image_resize/issues/9)).
|
||||
- Fixed resizing when the destination image has the same dimensions as the
|
||||
source image ([#9](https://github.com/Cykooz/fast_image_resize/issues/9)).
|
||||
|
||||
## [0.9.6] - 2022-06-28
|
||||
|
||||
- Added support of new type of pixels `PixelType::U16x4`.
|
||||
- Fixed benchmarks for resizing images with alpha channel using
|
||||
the `resizer` crate.
|
||||
- Fixed benchmarks for resizing images with alpha channel using the `resizer`
|
||||
crate.
|
||||
- Removed `image` crate from benchmarks for resizing images with alpha.
|
||||
- Added method `Image::copy(&self) -> Image<'static>`.
|
||||
|
||||
@@ -549,8 +599,8 @@ fn my_resize(
|
||||
|
||||
## [0.9.1] - 2022-05-12
|
||||
|
||||
- Added optimisation for processing `U8x2` images by `MulDiv` with
|
||||
helps of `SSE4.1` and `AVX2` instructions.
|
||||
- Added optimisation for processing `U8x2` images by `MulDiv` with helps of
|
||||
`SSE4.1` and `AVX2` instructions.
|
||||
- Added optimisation for convolution of `U16x2` images with helps of
|
||||
`AVX2` instructions.
|
||||
|
||||
@@ -582,18 +632,21 @@ fn my_resize(
|
||||
|
||||
## [0.6.0] - 2022-01-12
|
||||
|
||||
- Added optimisation of multiplying and dividing image by alpha channel with helps
|
||||
of `SSE4.1` instructions.
|
||||
- Improved performance of dividing image by alpha channel without forced
|
||||
SIMD instructions.
|
||||
- Added optimisation of multiplying and dividing image by alpha channel with
|
||||
helps of `SSE4.1` instructions.
|
||||
- Improved performance of dividing image by alpha channel without forced SIMD
|
||||
instructions.
|
||||
- Breaking changes:
|
||||
- Deleted variant `SSE2` from enum `CpuExtensions`.
|
||||
|
||||
## [0.5.3] - 2021-12-14
|
||||
|
||||
- Added optimisation of convolution U8x3 images with helps of `AVX2` instructions.
|
||||
- Fixed error in code for convolution U8x4 images with helps of `SSE4.1` instructions.
|
||||
- Fixed error in code for convolution U8 images with helps of `AVX2` instructions.
|
||||
- Added optimisation of convolution U8x3 images with helps of `AVX2`
|
||||
instructions.
|
||||
- Fixed error in code for convolution U8x4 images with helps of `SSE4.1`
|
||||
instructions.
|
||||
- Fixed error in code for convolution U8 images with helps of `AVX2`
|
||||
instructions.
|
||||
|
||||
## [0.5.2] - 2021-11-26
|
||||
|
||||
@@ -605,13 +658,13 @@ fn my_resize(
|
||||
|
||||
## [0.5.0] - 2021-11-18
|
||||
|
||||
- Added support of new type of pixels `PixelType::U8x3` (with
|
||||
auto-vectorization for SSE4.1).
|
||||
- Added support of new type of pixels `PixelType::U8x3` (with auto-vectorization
|
||||
for SSE4.1).
|
||||
- Exposed module `fast_image_resize::pixels` with types `U8x3`,
|
||||
`U8x4`, `F32`, `I32`, `U8` used as wrappers for represent type of
|
||||
one pixel of image.
|
||||
- Some optimisations in code of convolution written in Rust (without
|
||||
intrinsics for SIMD).
|
||||
`U8x4`, `F32`, `I32`, `U8` used as wrappers for represent type of one pixel of
|
||||
image.
|
||||
- Some optimisations in code of convolution written in Rust (without intrinsics
|
||||
for SIMD).
|
||||
- Breaking changes:
|
||||
- Added variant `U8x3` into the enum `PixelType`.
|
||||
- Changed internal tuple structures inside of variant of `ImageRows`
|
||||
@@ -619,7 +672,8 @@ fn my_resize(
|
||||
|
||||
## [0.4.1] - 2021-11-13
|
||||
|
||||
- Added optimisation of convolution grayscale images (U8) with helps of `AVX2` instructions.
|
||||
- Added optimisation of convolution grayscale images (U8) with helps of `AVX2`
|
||||
instructions.
|
||||
|
||||
## [0.4.0] - 2021-10-23
|
||||
|
||||
@@ -628,7 +682,8 @@ fn my_resize(
|
||||
- `ImageData` renamed into `Image`.
|
||||
- `SrcImageView` and `DstImageView` replaced by `ImageView`
|
||||
and `ImageViewMut`.
|
||||
- Method `Resizer.resize()` now returns `Result<(), DifferentTypesOfPixelsError>`.
|
||||
- Method `Resizer.resize()` now returns
|
||||
`Result<(), DifferentTypesOfPixelsError>`.
|
||||
|
||||
## [0.3.1] - 2021-10-09
|
||||
|
||||
|
||||
@@ -28,26 +28,26 @@ Supported pixel formats and available optimizations:
|
||||
|
||||
## Rust version
|
||||
|
||||
Rust 1.95 and 1.96 (actually LLVM) have [regression](https://github.com/rust-lang/rust/issues/157456)
|
||||
in Wasm32 SIMD128 implementation.
|
||||
It affects the implementation of dividing U8x4 pixels by alpha channel for Wasm32 SIMD128.
|
||||
Rust 1.95 and 1.96 (actually LLVM)
|
||||
have [regression](https://github.com/rust-lang/rust/issues/157456)
|
||||
in Wasm32 SIMD128 implementation. It affects the implementation of dividing U8x4 pixels by
|
||||
alpha channel for Wasm32 SIMD128.
|
||||
|
||||
## Colorspace
|
||||
|
||||
Resizer from this crate does not convert image into linear colorspace
|
||||
during a resize process. If it is important for you to resize images with a
|
||||
non-linear color space (e.g. sRGB) correctly, then you have to convert
|
||||
it to a linear color space before resizing and convert back to the color space of
|
||||
result image. [Read more](http://www.ericbrasseur.org/gamma.html)
|
||||
about resizing with respect to color space.
|
||||
Resizer from this crate does not convert image into linear colorspace during a resize
|
||||
process. If it is important for you to resize images with a non-linear color space (e.g.
|
||||
sRGB) correctly, then you have to convert it to a linear color space before resizing and
|
||||
convert back to the color space of the result
|
||||
image. [Read more](http://www.ericbrasseur.org/gamma.html) about resizing with respect to
|
||||
color space.
|
||||
|
||||
This crate provides the
|
||||
[PixelComponentMapper](https://docs.rs/fast_image_resize/latest/fast_image_resize/struct.PixelComponentMapper.html)
|
||||
structure that allows you to create colorspace converters for images
|
||||
whose pixels based on `u8` and `u16` components.
|
||||
This crate provides the [PixelComponentMapper](https://docs.rs/fast_image_resize/latest/fast_image_resize/struct.PixelComponentMapper.html)
|
||||
structure that allows you to create colorspace converters for images whose pixels are
|
||||
based on `u8` and `u16` components.
|
||||
|
||||
In addition, the crate contains functions `create_gamma_22_mapper()`
|
||||
and `create_srgb_mapper()` to create instance of `PixelComponentMapper`
|
||||
and `create_srgb_mapper()` to create an instance of `PixelComponentMapper`
|
||||
that converts images from sRGB or gamma 2.2 into linear colorspace and back.
|
||||
|
||||
## Multi-threading
|
||||
@@ -57,8 +57,8 @@ You should enable `"rayon"` feature to turn on image processing in
|
||||
|
||||
## Use in a `no_std` environment
|
||||
|
||||
To use the crate in a `no_std` environment you must disable
|
||||
default features and enabled the `no_std` feature:
|
||||
To use the crate in a `no_std` environment you must disable default features and enable
|
||||
the `no_std` feature:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
@@ -68,9 +68,12 @@ fast_image_resize = { version = "6.0", default-features = false, features = ["no
|
||||
## Some benchmarks in single-threaded mode for x86_64
|
||||
|
||||
_All benchmarks:_
|
||||
[_x86_64_](https://github.com/Cykooz/fast_image_resize/blob/main/benchmarks-x86_64.md),
|
||||
[_ARM64_](https://github.com/Cykooz/fast_image_resize/blob/main/benchmarks-arm64.md),
|
||||
[_WASM32_](https://github.com/Cykooz/fast_image_resize/blob/main/benchmarks-wasm32.md).
|
||||
[
|
||||
_x86_64_](https://github.com/Cykooz/fast_image_resize/blob/main/benchmarks-x86_64.md),
|
||||
[
|
||||
_ARM64_](https://github.com/Cykooz/fast_image_resize/blob/main/benchmarks-arm64.md),
|
||||
[
|
||||
_WASM32_](https://github.com/Cykooz/fast_image_resize/blob/main/benchmarks-wasm32.md).
|
||||
|
||||
Other libraries used to compare of resizing speed:
|
||||
|
||||
@@ -152,7 +155,7 @@ Pipeline:
|
||||
|
||||
Note: You must enable `"image"` feature to support of
|
||||
[image::DynamicImage](https://docs.rs/image/latest/image/enum.DynamicImage.html).
|
||||
Otherwise, you have to convert such images into supported by the crate image type.
|
||||
Otherwise, you have to convert such images into a supported by the crate image type.
|
||||
|
||||
```rust
|
||||
use std::io::BufWriter;
|
||||
|
||||
@@ -26,15 +26,15 @@ SAVE_RESULT=1 cargo test
|
||||
|
||||
# Benchmarks
|
||||
|
||||
Run benchmarks to compare with other crates for image resizing and write results into
|
||||
report files, such as `./benchmarks-x86_64.md`:
|
||||
Run benchmarks to compare with other crates for image resizing and write results
|
||||
into report files, such as `./benchmarks-x86_64.md`:
|
||||
|
||||
```shell
|
||||
WRITE_COMPARE_RESULT=1 cargo bench -- Compare
|
||||
```
|
||||
|
||||
If you want to use old benchmark results for other crates, you must add
|
||||
an env variable with the number of days as a result lifetime:
|
||||
If you want to use old benchmark results for other crates, you must add an env
|
||||
variable with the number of days as a result lifetime:
|
||||
|
||||
```shell
|
||||
WRITE_COMPARE_RESULT=1 RESULTS_LIFETIME=5 cargo bench -- Compare
|
||||
@@ -48,7 +48,7 @@ cargo bench --bench bench_resize -- --color=always --quick
|
||||
|
||||
# Wasm32
|
||||
|
||||
Specify build target and runner in `.cargo/config.toml` file.
|
||||
Specify the build target and runner in `.cargo/config.toml` file.
|
||||
|
||||
```toml
|
||||
[build]
|
||||
@@ -70,8 +70,8 @@ Run tests with saving result images as files in `./data` directory:
|
||||
CARGO_TARGET_WASM32_WASIP2_RUNNER="wasmtime --dir=. --env SAVE_RESULT=1 --" cargo test
|
||||
```
|
||||
|
||||
Run benchmarks to compare with other crates for image resizing and write results into
|
||||
report files, such as `./benchmarks-wasm32.md`:
|
||||
Run benchmarks to compare with other crates for image resizing and write results
|
||||
into report files, such as `./benchmarks-wasm32.md`:
|
||||
|
||||
```shell
|
||||
CARGO_TARGET_WASM32_WASIP2_RUNNER="wasmtime --dir=. --env WRITE_COMPARE_RESULT=1 --" cargo bench --no-fail-fast -- --color=always Compare
|
||||
|
||||
Reference in New Issue
Block a user