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
sourceimpl 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 RefUnwindSafe for Info
impl Send for Info
impl Sync for Info
impl Unpin for Info
impl UnwindSafe for Info
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more