Structureswift-png 4.4.5PNG
Palette
An image palette.
PNG.Palette.swift:9@frozen struct Palette
This type models the information stored in a PLTE
chunk. This information is used to populate the non-alpha components of the palette
field in an image color Format
, when appropriate.
See also
View members
Hide members
This section is hidden by default because it contains too many (14) members.
struct Metadata
The metadata in a PNG image.
struct Header
An image header.
struct Background
A background descriptor.
struct Transparency
A transparency descriptor.
struct Chromaticity
A chromaticity descriptor.
struct ColorProfile
An embedded color profile.
enum ColorRendering
A color rendering mode.
struct Gamma
A gamma descriptor.
struct Histogram
A palette frequency histogram.
struct PhysicalDimensions
A physical dimensions descriptor.
struct SignificantBits
A color precision descriptor.
struct SuggestedPalette
A suggested image palette.
struct Text
A text comment.
struct TimeModified
An image modification time.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (37) members.
Protocols
protocol BytestreamDestination
A destination bytestream.
protocol BytestreamSource
A source bytestream.
protocol Color<Aggregate>
A color target.
protocol Error
Functionality common to all library error types.
Types
struct Chunk
A chunk type identifier.
struct Context
A decoding context.
enum DecodingError
A decoding error.
enum Format
A color format.
enum FormattingError
A formatting error.
struct Image
A rectangular image.
struct Layout
An image layout.
enum LexingError
A lexing error.
enum ParsingError
A parsing error.
struct Percentmille
A rational percentmille value.
struct RGBA<T>
An RGBA color target.
enum Standard
A PNG standard.
struct VA<T>
A grayscale-alpha color target.
Show obsolete interfaces (2)
Hide obsolete interfaces
enum Bytestream
A namespace for bytestream utilities.
enum Data
A namespace containing the
Image
type.
Type members
static func convolve<A, T, C>([UInt8], dereference: (Int) -> A, kernel: (T) -> C
) -> [C] Converts an image data buffer to a pixel array, using the given pixel kernel and dereferencing function.
static func convolve<A, T, C>([UInt8], dereference: (Int) -> (A, A), kernel: ((T, T)) -> C
) -> [C] Converts an image data buffer to a pixel array, using the given pixel kernel and dereferencing function.
static func convolve<A, T, C>([UInt8], dereference: (Int) -> (A, A, A), kernel: ((T, T, T)) -> C
) -> [C] Converts an image data buffer to a pixel array, using the given pixel kernel and dereferencing function.
static func convolve<A, T, C>([UInt8], dereference: (Int) -> (A, A, A, A), kernel: ((T, T, T, T)) -> C
) -> [C] Converts an image data buffer to a pixel array, using the given pixel kernel and dereferencing function.
static func convolve<A, T, C>([UInt8], of: A.Type, depth: Int, kernel: ((T, T, T, T)) -> C
) -> [C] Converts an image data buffer to a pixel array, using the given pixel kernel.
static func convolve<A, T, C>([UInt8], of: A.Type, depth: Int, kernel: ((T, T, T), (A, A, A)) -> C
) -> [C] Converts an image data buffer to a pixel array, using the given pixel kernel.
static func convolve<A, T, C>([UInt8], of: A.Type, depth: Int, kernel: ((T, T)) -> C
) -> [C] Converts an image data buffer to a pixel array, using the given pixel kernel.
static func convolve<A, T, C>([UInt8], of: A.Type, depth: Int, kernel: (T, A) -> C
) -> [C] Converts an image data buffer to a pixel array, using the given pixel kernel.
static func deconvolve<A, T, C>([C], as: A.Type, depth: Int, kernel: (C) -> (T, T, T, T)
) -> [UInt8] Converts a pixel array to an image data buffer, using the given pixel kernel.
static func deconvolve<A, T, C>([C], as: A.Type, depth: Int, kernel: (C) -> (T, T, T)
) -> [UInt8] Converts a pixel array to an image data buffer, using the given pixel kernel.
static func deconvolve<A, T, C>([C], as: A.Type, depth: Int, kernel: (C) -> (T, T)
) -> [UInt8] Converts a pixel array to an image data buffer, using the given pixel kernel.
static func deconvolve<A, T, C>([C], as: A.Type, depth: Int, kernel: (C) -> T
) -> [UInt8] Converts a pixel array to an image data buffer, using the given pixel kernel.
static func deconvolve<A, T, C>([C], reference: (A) -> Int, kernel: (C) -> T
) -> [UInt8] Converts a pixel array to an image data buffer, using the given pixel kernel and referencing function.
static func deconvolve<A, T, C>([C], reference: ((A, A)) -> Int, kernel: (C) -> (T, T)
) -> [UInt8] Converts a pixel array to an image data buffer, using the given pixel kernel and referencing function.
static func deconvolve<A, T, C>([C], reference: ((A, A, A)) -> Int, kernel: (C) -> (T, T, T)
) -> [UInt8] Converts a pixel array to an image data buffer, using the given pixel kernel and referencing function.
static func deconvolve<A, T, C>([C], reference: ((A, A, A, A)) -> Int, kernel: (C) -> (T, T, T, T)
) -> [UInt8] Converts a pixel array to an image data buffer, using the given pixel kernel and referencing function.
static func premultiply<T>(T, alpha: T
) -> T Premultiplies a color component with an alpha value.
static func straighten<T>(T, alpha: T
) -> T Straightens a premultiplied color component given an alpha value.
Citizens in PNG
Conformances
protocol Sendable
A type whose values can safely be passed across concurrency domains by copying.
Type members
init(entries: [(r: UInt8, g: UInt8, b: UInt8)], pixel: PNG.Format.Pixel
) Creates an image palette.
init(parsing: [UInt8], pixel: PNG.Format.Pixel
) throws Creates an image palette by parsing the given chunk data, interpreting and validating it according to the given
pixel
format.
Instance members
let entries: [(r: UInt8, g: UInt8, b: UInt8)]
The entries in this palette.
var serialized: [UInt8]
Encodes this image palette as the contents of a
PLTE
chunk.