pub enum AlphaColorMode {
UnassociatedDirty,
UnassociatedClean,
Premultiplied,
}
Expand description
Handling of color channels in transparent images. For Encoder::with_alpha_color_mode
Variants§
UnassociatedDirty
Use unassociated alpha channel and leave color channels unchanged, even if there’s redundant color data in transparent areas.
UnassociatedClean
Use unassociated alpha channel, but set color channels of transparent areas to a solid color to eliminate invisible data and improve compression.
Premultiplied
Store color channels of transparent images in premultiplied form. This requires support for premultiplied alpha in AVIF decoders.
It may reduce file sizes due to clearing of fully-transparent pixels, but may also increase file sizes due to creation of new edges in the color channels.
Note that this is only internal detail for the AVIF file.
It does not change meaning of RGBA
in this library — it’s always unassociated.
Trait Implementations§
Source§impl Clone for AlphaColorMode
impl Clone for AlphaColorMode
Source§fn clone(&self) -> AlphaColorMode
fn clone(&self) -> AlphaColorMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AlphaColorMode
impl Debug for AlphaColorMode
Source§impl PartialEq for AlphaColorMode
impl PartialEq for AlphaColorMode
impl Copy for AlphaColorMode
impl Eq for AlphaColorMode
impl StructuralPartialEq for AlphaColorMode
Auto Trait Implementations§
impl Freeze for AlphaColorMode
impl RefUnwindSafe for AlphaColorMode
impl Send for AlphaColorMode
impl Sync for AlphaColorMode
impl Unpin for AlphaColorMode
impl UnwindSafe for AlphaColorMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more