pub use decoder::DecoderOptions;
use crate::bit_depth::BitDepth;
use crate::colorspace::ColorSpace;
mod decoder;
#[derive(Debug, Copy, Clone)]
pub struct EncoderOptions
{
pub width: usize,
pub height: usize,
pub colorspace: ColorSpace,
pub quality: u8,
pub depth: BitDepth
}
impl Default for EncoderOptions
{
fn default() -> Self
{
Self {
width: 0,
height: 0,
colorspace: ColorSpace::RGB,
quality: 100,
depth: BitDepth::Eight
}
}
}
impl EncoderOptions
{
pub const fn get_width(&self) -> usize
{
self.width
}
pub const fn get_height(&self) -> usize
{
self.height
}
pub const fn get_depth(&self) -> BitDepth
{
self.depth
}
pub const fn get_quality(&self) -> u8
{
self.quality
}
pub const fn get_colorspace(&self) -> ColorSpace
{
self.colorspace
}
}