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 pixel_dims: Option<PixelDimensions>, pub palette: Option<Vec<u8>>, pub frame_control: Option<FrameControl>, pub animation_control: Option<AnimationControl>, }
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>
Methods
impl Info
[src]
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