Type Aliasswift-png 4.4.5PNG
Aggregate
Palette aggregates are (gray, alpha) pairs.
PNG.VA.swift:137typealias Aggregate = (UInt8, UInt8)
Other members in extension
Type members
init(T
) Creates an opaque grayscale-alpha color.
init(T, T
) Creates a grayscale-alpha color.
static func pack([`Self`], as: PNG.Format, indexer: ([(r: UInt8, g: UInt8, b: UInt8, a: UInt8)]) -> (Aggregate) -> Int
) -> [UInt8] Packs an array of grayscale-alpha 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 grayscale-alpha pixels.
Instance members
var premultiplied: `Self`
The color obtained by premultiplying the gray component of this color with its alpha channel.
var straightened: `Self`
The color obtained by straightening the gray component of this color according to its alpha channel.
func premultiplied<U>(as: U.Type
) -> PNG.VA<T> The color obtained by premultiplying the gray component of this color with its alpha channel, performing the premultiplication in the given integer type.
func straightened<U>(as: U.Type
) -> PNG.VA<T> The color obtained by straightening the gray component of this color according to its alpha channel, performing the straightening in the given integer type.