mirror of
https://github.com/Cykooz/fast_image_resize.git
synced 2026-10-08 01:11:09 +00:00
Fixed doc-strings and dependencies.
This commit is contained in:
+5
-4
@@ -23,16 +23,17 @@ exclude = ["/data"]
|
||||
cfg-if = "1.0"
|
||||
num-traits = "0.2.19"
|
||||
thiserror = "1.0"
|
||||
bytemuck = "1.15"
|
||||
document-features = "0.2.8"
|
||||
|
||||
image = { version = "0.25.1", optional = true }
|
||||
bytemuck = { version = "1.16", optional = true }
|
||||
|
||||
[features]
|
||||
## Enable this feature to implement traits [IntoImageView](crate::IntoImageView) and
|
||||
## [IntoImageViewMut](crate::IntoImageViewMut) for the
|
||||
## [DynamicImage](https://docs.rs/image/latest/image/enum.DynamicImage.html)
|
||||
## type from the `image` crate.
|
||||
image = { version = "0.25.1", optional = true }
|
||||
|
||||
[features]
|
||||
image = ["dep:image", "dep:bytemuck"]
|
||||
for_test = ["image"]
|
||||
only_u8x4 = [] # This can be used to experiment with the crate's code.
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ pub mod testing;
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
mod wasm32_utils;
|
||||
|
||||
/// A trait implemented by all pixel types from the crate.
|
||||
///
|
||||
/// This trait must be used in your code instead of [InnerPixel](pixels::InnerPixel).
|
||||
#[allow(private_bounds)]
|
||||
pub trait PixelTrait: Convolution + AlphaMulDiv {}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ edition = "2021"
|
||||
|
||||
|
||||
[dependencies]
|
||||
fast_image_resize = { path = ".." }
|
||||
fast_image_resize = { path = "..", features = ["image"] }
|
||||
image = "0.25.1"
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ pub fn nonzero(v: u32) -> NonZeroU32 {
|
||||
NonZeroU32::new(v).unwrap()
|
||||
}
|
||||
|
||||
pub fn image_checksum<P: InnerPixel, const N: usize>(image: &Image) -> [u64; N] {
|
||||
pub fn image_checksum<P: PixelTrait, const N: usize>(image: &Image) -> [u64; N] {
|
||||
let buffer = image.buffer();
|
||||
let mut res = [0u64; N];
|
||||
let component_size = P::size() / P::count_of_components();
|
||||
|
||||
Reference in New Issue
Block a user