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