Struct webp::BitstreamFeatures
source · [−]pub struct BitstreamFeatures(_);
Expand description
A wrapper around libwebp-sys::WebPBitstreamFeatures which allows to get information about the image.
Implementations
sourceimpl BitstreamFeatures
impl BitstreamFeatures
pub fn new(data: &[u8]) -> Option<Self>
sourcepub fn width(&self) -> u32
pub fn width(&self) -> u32
Returns the width of the image as described by the bitstream in pixels.
sourcepub fn height(&self) -> u32
pub fn height(&self) -> u32
Returns the height of the image as described by the bitstream in pixels.
sourcepub fn has_alpha(&self) -> bool
pub fn has_alpha(&self) -> bool
Returns true if the image as described by the bitstream has an alpha channel.
sourcepub fn has_animation(&self) -> bool
pub fn has_animation(&self) -> bool
Returns true if the image as described by the bitstream is animated.
sourcepub fn format(&self) -> Option<BitstreamFormat>
pub fn format(&self) -> Option<BitstreamFormat>
Returns the format of the image as described by image bitstream.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BitstreamFeatures
impl Send for BitstreamFeatures
impl Sync for BitstreamFeatures
impl Unpin for BitstreamFeatures
impl UnwindSafe for BitstreamFeatures
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more