pub struct Info {
pub width: u32,
pub height: u32,
pub bit_depth: BitDepth,
pub color_type: ColorType,
pub interlaced: bool,
pub trns: Option<Vec<u8>>,
pub pixel_dims: Option<PixelDimensions>,
pub palette: Option<Vec<u8>>,
pub frame_control: Option<FrameControl>,
pub animation_control: Option<AnimationControl>,
pub compression: Compression,
pub filter: FilterType,
}
Expand description
PNG info struct
Fields§
§width: u32
§height: u32
§bit_depth: BitDepth
§color_type: ColorType
§interlaced: bool
§trns: Option<Vec<u8>>
§pixel_dims: Option<PixelDimensions>
§palette: Option<Vec<u8>>
§frame_control: Option<FrameControl>
§animation_control: Option<AnimationControl>
§compression: Compression
§filter: FilterType
Implementations§
Source§impl Info
impl Info
Sourcepub fn is_animated(&self) -> bool
pub fn is_animated(&self) -> bool
Returns true if the image is an APNG image.
Sourcepub fn animation_control(&self) -> Option<&AnimationControl>
pub fn animation_control(&self) -> Option<&AnimationControl>
Returns the frame control information of the image
Sourcepub fn frame_control(&self) -> Option<&FrameControl>
pub fn frame_control(&self) -> Option<&FrameControl>
Returns the frame control information of the current frame
Sourcepub fn bits_per_pixel(&self) -> usize
pub fn bits_per_pixel(&self) -> usize
Returns the bits per pixel
Sourcepub fn bytes_per_pixel(&self) -> usize
pub fn bytes_per_pixel(&self) -> usize
Returns the bytes per pixel
Sourcepub fn raw_row_length(&self) -> usize
pub fn raw_row_length(&self) -> usize
Returns the number of bytes needed for one deinterlaced row
Sourcepub fn raw_row_length_from_width(&self, width: u32) -> usize
pub fn raw_row_length_from_width(&self, width: u32) -> usize
Returns the number of bytes needed for one deinterlaced row of width width
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Info
impl RefUnwindSafe for Info
impl Send for Info
impl Sync for Info
impl Unpin for Info
impl UnwindSafe for Info
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