Enumerationswift-png 4.4.5PNG
Case
A background case. This is a separate type for validation purposes.
PNG.Background.Case.swift:5@frozen enum Case
Cases
case palette(index: Int)
A background descriptor for an indexed image.
case rgb((r: UInt16, g: UInt16, b: UInt16))
A background descriptor for an RGB, BGR, RGBA, or BGRA image.
case v(UInt16)
A background descriptor for a grayscale or grayscale-alpha image.
Other members in extension
Type members
init(case: Case, pixel: PNG.Format.Pixel, palette: PNG.Palette?
) Creates a background descriptor.
init(parsing: [UInt8], pixel: PNG.Format.Pixel, palette: PNG.Palette?
) throws Creates a background descriptor by parsing the given chunk data, interpreting and validating it according to the given
pixel
format and imagepalette
.
Instance members
let `case`: Case
The value of this background descriptor.
var serialized: [UInt8]
Encodes this background descriptor as the contents of a
bKGD
chunk.