Struct png::Info
[−]
[src]
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 palette: Option<Vec<u8>>, pub frame_control: Option<FrameControl>, pub animation_control: Option<AnimationControl>, }
PNG info struct
Fields
width | |
height | |
bit_depth | |
color_type | |
interlaced | |
trns | |
palette | |
frame_control | |
animation_control |
Methods
impl Info
fn size(&self) -> (u32, u32)
Size of the image
fn is_animated(&self) -> bool
Returns true if the image is an APNG image.
fn animation_control(&self) -> Option<&AnimationControl>
Returns the frame control information of the image
fn frame_control(&self) -> Option<&FrameControl>
Returns the frame control information of the current frame
fn bits_per_pixel(&self) -> usize
Returns the bits per pixel
fn bytes_per_pixel(&self) -> usize
Returns the bytes per pixel
fn raw_bytes(&self) -> usize
Returns the number of bytes needed for one deinterlaced image
fn raw_row_length(&self) -> usize
Returns the number of bytes needed for one deinterlaced row
fn raw_row_length_from_width(&self, width: u32) -> usize
Returns the number of bytes needed for one deinterlaced row of width width