avif-rs 26.6.0

Encode AVIF images with SVT-AV1 and decode with dav1d, via statically-linked libavif.
//! Image metadata types returned by probing and decoding.

use image::ColorType;

/// Metadata describing an AVIF image, without (necessarily) decoding its pixels.
#[derive(Debug, Clone)]
pub struct ImageInfo {
    pub width: u32,
    pub height: u32,
    /// Reuse `image`'s enum — no point rolling our own.
    pub color_type: ColorType,
    /// Bit depth per channel; `image` has no equivalent for this.
    pub bit_depth: BitDepth,
}

/// Bits per channel of an AVIF image.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[non_exhaustive]
pub enum BitDepth {
    Eight,
    Ten,
    Twelve,
}