#[non_exhaustive]pub enum ConvertIntent {
Fastest,
LinearLight,
Blend,
Perceptual,
}Expand description
What the consumer plans to do with the converted pixels.
Shifts the format negotiation cost model to prefer formats suited for the intended operation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fastest
Minimize conversion effort. Good for encoding — the codec already knows what it wants, just get there cheaply.
LinearLight
Pixel-accurate operations that need linear light: resize, blur, anti-aliasing, mipmap generation. Prefers f32 Linear. Straight alpha is fine.
Blend
Compositing and blending (Porter-Duff, layer merge). Prefers f32 Linear with Premultiplied alpha.
Perceptual
Perceptual adjustments: sharpening, contrast, saturation. Prefers sRGB space (perceptually uniform).
Trait Implementations§
Source§impl Clone for ConvertIntent
impl Clone for ConvertIntent
Source§fn clone(&self) -> ConvertIntent
fn clone(&self) -> ConvertIntent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConvertIntent
impl Debug for ConvertIntent
Source§impl Default for ConvertIntent
impl Default for ConvertIntent
Source§fn default() -> ConvertIntent
fn default() -> ConvertIntent
Returns the “default value” for a type. Read more
Source§impl PartialEq for ConvertIntent
impl PartialEq for ConvertIntent
impl Copy for ConvertIntent
impl Eq for ConvertIntent
impl StructuralPartialEq for ConvertIntent
Auto Trait Implementations§
impl Freeze for ConvertIntent
impl RefUnwindSafe for ConvertIntent
impl Send for ConvertIntent
impl Sync for ConvertIntent
impl Unpin for ConvertIntent
impl UnsafeUnpin for ConvertIntent
impl UnwindSafe for ConvertIntent
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