use edgefirst_tensor::PixelFormat;
#[derive(Debug, Clone)]
pub struct DecodeOptions {
pub format: Option<PixelFormat>,
pub apply_exif: bool,
}
impl Default for DecodeOptions {
fn default() -> Self {
Self {
format: None,
apply_exif: true,
}
}
}
impl DecodeOptions {
#[must_use]
pub fn with_format(mut self, format: PixelFormat) -> Self {
self.format = Some(format);
self
}
#[must_use]
pub fn with_exif(mut self, apply: bool) -> Self {
self.apply_exif = apply;
self
}
}
#[derive(Debug, Clone, Copy)]
pub struct ImageInfo {
pub width: usize,
pub height: usize,
pub format: PixelFormat,
pub row_stride: usize,
}