Skip to content

IPixelBufferSource.HasAlpha property

Gets whether the buffer carries a meaningful alpha channel; false means every pixel is fully opaque by construction (JPEG decode, opaque PNG, 24-bit BMP), and the default is true.

public bool HasAlpha { get; }

Lets consumers skip per-pixel alpha scans (the conservative “is every byte 0xFF?” check that runs before premultiply) and pick the opaque blending path, which avoids per-fragment blend math. The default preserves alpha-aware blending for any source that has not explicitly opted out.