Struct lofty::PictureInformation [−][src]
pub struct PictureInformation {
pub width: u32,
pub height: u32,
pub color_depth: u32,
pub num_colors: u32,
}Expand description
Information about a Picture
This information is necessary for FLAC’s METADATA_BLOCK_PICTURE.
See Picture::as_flac_bytes for more information.
Fields
width: u32The picture’s width in pixels
height: u32The picture’s height in pixels
color_depth: u32The picture’s color depth in bits per pixel
num_colors: u32The number of colors used
Implementations
Attempt to extract PictureInformation from a Picture
NOTE: Since FLAC only supports PNG and JPEG, this function is no different.
Errors
picture.datais less than 8 bytes in lengthpicture.datacontains a format that isn’t PNG or JPEG- See
PictureInformation::from_pngandPictureInformation::from_jpeg
Attempt to extract PictureInformation from a PNG
Errors
readerdoes not start with a PNG signaturereaderis not a valid PNG
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for PictureInformation
impl Send for PictureInformation
impl Sync for PictureInformation
impl Unpin for PictureInformation
impl UnwindSafe for PictureInformation
Blanket Implementations
Mutably borrows from an owned value. Read more
