Instance Propertyswift-png 4.4.5PNG
va
The grayscale-alpha color obtained by discarding the green and blue components of this color.
PNG.RGBA.swift:110var va: PNG.VA<T> { get }
Other members in extension
Typealiases
typealias Aggregate
Palette aggregates are (red, green, blue, alpha) quadruplets.
Type members
init(PNG.VA<T>
) Creates an RGBA color from a grayscale-alpha color.
init(T
) Creates an opaque, monochromatic RGBA color.
init(T, T
) Creates a monochromatic RGBA color.
init(T, T, T
) Creates an opaque RGBA color.
init(T, T, T, T
) Creates an RGBA color.
static func pack([`Self`], as: PNG.Format, indexer: ([(r: UInt8, g: UInt8, b: UInt8, a: UInt8)]) -> (Aggregate) -> Int
) -> [UInt8] Packs an array of RGBA pixels to an image data storage buffer.
static func unpack([UInt8], of: PNG.Format, deindexer: ([(r: UInt8, g: UInt8, b: UInt8, a: UInt8)]) -> (Int) -> Aggregate
) -> [`Self`] Unpacks an image data storage buffer to an array of RGBA pixels.
Instance members
var premultiplied: `Self`
The color obtained by premultiplying the red, green, and blue components of this color with its alpha channel.
var straightened: `Self`
The color obtained by straightening the red, green, and blue components of this color according to its alpha channel.
func premultiplied<U>(as: U.Type
) -> PNG.RGBA<T> The color obtained by premultiplying the red, green, and blue components of this color with its alpha channel, performing the premultiplication in the given integer type.
func straightened<U>(as: U.Type
) -> PNG.RGBA<T> The color obtained by straightening the red, green, and blue components of this color according to its alpha channel, performing the straightening in the given integer type.