use half::f16;
pub struct ImageInfo {
pub width: u32,
pub height: u32,
pub bit_depth: u8,
pub color_type: u8,
pub pixels: ImagePixels,
}
pub enum ImagePixels {
U8(Vec<u8>),
U16(Vec<u16>),
F16(Vec<f16>),
F32(Vec<f32>),
}
pub struct CompressionConfig {
pub allow_webp: bool,
pub allow_png: bool,
pub allow_oxipng_zopfli: bool,
pub allow_jpeg_xl: bool,
}
impl CompressionConfig {
pub fn default() -> CompressionConfig {
CompressionConfig {
allow_webp: true,
allow_png: true,
allow_oxipng_zopfli: false,
allow_jpeg_xl: true,
}
}
}