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]
impl Infopub fn size(&self) -> (u32, u32)[src]
pub fn size(&self) -> (u32, u32)Size of the image
pub fn is_animated(&self) -> bool[src]
pub fn is_animated(&self) -> boolReturns true if the image is an APNG image.
pub fn animation_control(&self) -> Option<&AnimationControl>[src]
pub fn animation_control(&self) -> Option<&AnimationControl>Returns the frame control information of the image
pub fn frame_control(&self) -> Option<&FrameControl>[src]
pub fn frame_control(&self) -> Option<&FrameControl>Returns the frame control information of the current frame
pub fn bits_per_pixel(&self) -> usize[src]
pub fn bits_per_pixel(&self) -> usizeReturns the bits per pixel
pub fn bytes_per_pixel(&self) -> usize[src]
pub fn bytes_per_pixel(&self) -> usizeReturns the bytes per pixel
pub fn raw_bytes(&self) -> usize[src]
pub fn raw_bytes(&self) -> usizeReturns the number of bytes needed for one deinterlaced image
pub fn raw_row_length(&self) -> usize[src]
pub fn raw_row_length(&self) -> usizeReturns the number of bytes needed for one deinterlaced row
pub fn raw_row_length_from_width(&self, width: u32) -> usize[src]
pub fn raw_row_length_from_width(&self, width: u32) -> usizeReturns the number of bytes needed for one deinterlaced row of width width
Trait Implementations
impl Debug for Info[src]
impl Debug for Infofn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Default for Info[src]
impl Default for Info