#[non_exhaustive]pub struct Stats {
pub channels: Vec<ChannelStats>,
pub is_opaque: bool,
pub entropy: f64,
pub sharpness: f64,
pub dominant: [u8; 3],
}Expand description
Pixel statistics of an image (sharp’s stats()), in its own sample
scale: 0–255 for 8-bit, 0–65535 for 16-bit, 0–1 for float.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.channels: Vec<ChannelStats>Each channel, alpha included, in order.
is_opaque: boolNo alpha channel, or every alpha sample opaque.
entropy: f64Shannon entropy, in bits, of the greyscale histogram.
sharpness: f64The standard deviation of the greyscale Laplacian: higher is sharper.
dominant: [u8; 3]The most common sRGB colour, by a 16-level-per-channel histogram, each channel the centre of its bin.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Stats
Auto Trait Implementations§
impl Freeze for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnsafeUnpin for Stats
impl UnwindSafe for Stats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more