Struct png::Info [−][src]
pub struct Info<'a> {Show 18 fields
pub width: u32,
pub height: u32,
pub bit_depth: BitDepth,
pub color_type: ColorType,
pub interlaced: bool,
pub trns: Option<Cow<'a, [u8]>>,
pub pixel_dims: Option<PixelDimensions>,
pub source_gamma: Option<ScaledFloat>,
pub palette: Option<Cow<'a, [u8]>>,
pub frame_control: Option<FrameControl>,
pub animation_control: Option<AnimationControl>,
pub compression: Compression,
pub source_chromaticities: Option<SourceChromaticities>,
pub srgb: Option<SrgbRenderingIntent>,
pub icc_profile: Option<Cow<'a, [u8]>>,
pub uncompressed_latin1_text: Vec<TEXtChunk>,
pub compressed_latin1_text: Vec<ZTXtChunk>,
pub utf8_text: Vec<ITXtChunk>,
// some fields omitted
}
Expand description
PNG info struct
Fields
width: u32
height: u32
bit_depth: BitDepth
color_type: ColorType
How colors are stored in the image.
interlaced: bool
trns: Option<Cow<'a, [u8]>>
The image’s tRNS
chunk, if present; contains the alpha channel of the image’s palette, 1 byte per entry.
pixel_dims: Option<PixelDimensions>
source_gamma: Option<ScaledFloat>
Gamma of the source system.
palette: Option<Cow<'a, [u8]>>
The image’s PLTE
chunk, if present; contains the RGB channels (in that order) of the image’s palettes, 3 bytes per entry (1 per channel).
frame_control: Option<FrameControl>
animation_control: Option<AnimationControl>
compression: Compression
source_chromaticities: Option<SourceChromaticities>
Chromaticities of the source system.
srgb: Option<SrgbRenderingIntent>
The rendering intent of an SRGB image.
Presence of this value also indicates that the image conforms to the SRGB color space.
icc_profile: Option<Cow<'a, [u8]>>
The ICC profile for the image.
uncompressed_latin1_text: Vec<TEXtChunk>
tEXt field
compressed_latin1_text: Vec<ZTXtChunk>
zTXt field
utf8_text: Vec<ITXtChunk>
iTXt field
Implementations
A utility constructor for a default info with width and height.
Returns true if the image is an APNG image.
Returns the frame control information of the image.
Returns the frame control information of the current frame
Returns the number of bits per pixel.
Returns the number of bytes per pixel.
Returns the number of bytes needed for one deinterlaced row.
Returns the number of bytes needed for one deinterlaced row of width width
.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Info<'a>
impl<'a> UnwindSafe for Info<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more