mod byte_order_rw;
mod dng_reader;
mod dng_writer;
mod ifd_reader;
pub mod ifd;
pub mod tags;
#[cfg(feature = "yaml")]
#[allow(unstable_name_collisions)]
pub mod yaml;
pub use dng_reader::{DngReader, DngReaderError};
pub use dng_writer::DngWriter;
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub enum FileType {
Dng,
Dcp,
}
impl FileType {
pub fn from_magic(magic: u16) -> Option<Self> {
match magic {
42 => Some(Self::Dng),
0x4352 => Some(Self::Dcp),
_ => None,
}
}
pub fn magic(&self) -> u16 {
match self {
FileType::Dng => 42,
FileType::Dcp => 0x4352,
}
}
pub fn extension(&self) -> &str {
match self {
FileType::Dng => "dng",
FileType::Dcp => "dcp",
}
}
}