pub struct WebPProbe {
pub width: u32,
pub height: u32,
pub has_alpha: bool,
pub has_animation: bool,
pub frame_count: u32,
pub bitstream: BitstreamType,
pub icc_profile: Option<Vec<u8>>,
}Expand description
Result of probing a WebP file.
Fields§
§width: u32Image dimensions.
height: u32Image height.
has_alpha: boolWhether the image has an alpha channel.
has_animation: boolWhether the image is animated.
frame_count: u32Number of frames (1 for static images).
bitstream: BitstreamTypeBitstream type with quality details.
icc_profile: Option<Vec<u8>>ICC color profile, if present.
Implementations§
Source§impl WebPProbe
impl WebPProbe
Sourcepub fn estimated_quality(&self) -> Option<f32>
pub fn estimated_quality(&self) -> Option<f32>
Estimated source quality (0-100), or None for lossless.
Sourcepub fn recommended_quality(&self) -> Option<f32>
pub fn recommended_quality(&self) -> Option<f32>
Recommended zenwebp quality for re-encoding that matches the source.
Returns None for lossless files (use lossless re-encoding instead).
For lossy files, returns a quality value that should produce similar
perceptual quality without unnecessary size bloat.
Sourcepub fn is_lossless(&self) -> bool
pub fn is_lossless(&self) -> bool
Whether this file is lossless.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebPProbe
impl RefUnwindSafe for WebPProbe
impl Send for WebPProbe
impl Sync for WebPProbe
impl Unpin for WebPProbe
impl UnsafeUnpin for WebPProbe
impl UnwindSafe for WebPProbe
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more