pub enum Preset {
Default,
Picture,
Photo,
Drawing,
Icon,
Text,
}Expand description
A predefined configuration set, tuned for a kind of content (C:
WebPPreset).
§Examples
use webp::api::encode::{Config, Preset};
let config = Config::preset(Preset::Photo, 80.0)?;
assert_eq!(config.as_raw().quality, 80.0);Variants§
Default
The default preset (C: WEBP_PRESET_DEFAULT).
Picture
A digital picture, such as a portrait or an indoor shot
(C: WEBP_PRESET_PICTURE).
Photo
An outdoor photograph with natural lighting (C: WEBP_PRESET_PHOTO).
Drawing
A hand or line drawing with high-contrast details
(C: WEBP_PRESET_DRAWING).
Icon
A small, colorful image (C: WEBP_PRESET_ICON).
Text
Text-like content (C: WEBP_PRESET_TEXT).
Trait Implementations§
impl Copy for Preset
impl Eq for Preset
impl StructuralPartialEq for Preset
Auto Trait Implementations§
impl Forget for Preset
impl Freeze for Preset
impl Move for Preset
impl RefUnwindSafe for Preset
impl Send for Preset
impl Sync for Preset
impl Unpin for Preset
impl UnsafeUnpin for Preset
impl UnwindSafe for Preset
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