pub struct Header {Show 17 fields
pub version: u32,
pub width: u32,
pub height: u32,
pub layers: u16,
pub channels: u16,
pub bit_depth: u8,
pub is_signed: bool,
pub quality: u16,
pub chroma_scale: u8,
pub block_size: u8,
pub filter: Filter,
pub quantization: Quantization,
pub encoder: Encoder,
pub intent: Intent,
pub metadata_size: u32,
pub channel_size: usize,
pub image_size: usize,
}Fields§
§version: u32§width: u32§height: u32§layers: u16§channels: u16§bit_depth: u8§is_signed: bool§quality: u16§chroma_scale: u8§block_size: u8§filter: Filter§quantization: Quantization§encoder: Encoder§intent: Intent§metadata_size: u32§channel_size: usize§image_size: usizeImplementations§
Source§impl Header
impl Header
pub fn decode(encoded: &mut impl Read) -> Result<Header, HeaderErr>
pub fn encode(&self, buff: &mut impl Write) -> Result<()>
pub fn get_decompress_buffer_size(&self, downsampling: usize) -> usize
pub fn get_boost(&self) -> i16
pub fn get_downsampled_width(&self, downsampling: usize) -> usize
pub fn get_downsampled_height(&self, downsampling: usize) -> usize
pub fn get_downsampled_channel_size(&self, downsampling: usize) -> usize
pub fn get_channel_size(&self) -> usize
pub fn get_chroma_quality(&self) -> i32
pub fn get_image_size(&self) -> usize
pub fn get_downsampled_image_size(&self, downsampling: usize) -> usize
Trait Implementations§
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnsafeUnpin for Header
impl UnwindSafe for Header
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more