Enum AlphaColorMode
enum AlphaColorMode
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
RGBAin this library — it's always unassociated.
Implementations
impl Clone for AlphaColorMode
fn clone(self: &Self) -> AlphaColorMode
impl Copy for AlphaColorMode
impl Debug for AlphaColorMode
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for AlphaColorMode
impl Freeze for AlphaColorMode
impl PartialEq for AlphaColorMode
fn eq(self: &Self, other: &AlphaColorMode) -> bool
impl RefUnwindSafe for AlphaColorMode
impl Send for AlphaColorMode
impl StructuralPartialEq for AlphaColorMode
impl Sync for AlphaColorMode
impl Unpin for AlphaColorMode
impl UnsafeUnpin for AlphaColorMode
impl UnwindSafe for AlphaColorMode
impl<T> Any for AlphaColorMode
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for AlphaColorMode
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for AlphaColorMode
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for AlphaColorMode
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for AlphaColorMode
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for AlphaColorMode
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for AlphaColorMode
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for AlphaColorMode
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for AlphaColorMode
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>