#[non_exhaustive]pub enum AlphaMode {
None,
Opaque,
Straight,
Premultiplied,
Undefined,
}Expand description
Full re-export of zenpixels core types (zero module name collisions!).
Interpretation of an image’s alpha (or padding) channel.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
No alpha channel is present in the layout.
Opaque
Alpha channel is present and logically fully opaque (1.0 / 255 / 65535).
Freshly allocated buffers (PixelBuf::new) initialize stored alpha
lanes to channel maximum and set SampleClaims::all_opaque = true. Zero-copy constructors
(PixelBuf::from_typed, PixelBuf::from_bytes,
PixelView::new) do not mutate caller-supplied storage; converters
and exporters canonicalize unverified Opaque alpha lanes to channel maximum unless
SampleClaims::all_opaque is attached.
Straight
Unassociated (straight) alpha: RGB is independent of A.
Premultiplied
Associated (premultiplied) alpha: RGB is already multiplied by A.
Undefined
Padding channel (RGBx / BGRx): bytes carry unspecified values and are ignored.