Enumeration

PNG

A namespace for PNG-related functionality.

Declaration

enum PNG

Topics

Image data

enum PNG.Data

A namespace containing the Data.Rectangular type.

struct PNG.Data.Rectangular

A rectangular image.

struct PNG.Layout

An image layout.

struct PNG.Metadata

The metadata in an image.

Color formats

enum PNG.Format

A color format.

enum PNG.Format.Pixel

A pixel format.

Color targets

protocol PNG.Color

A color target.

struct PNG.RGBA<T>

An RGBA color target.

struct PNG.VA<T>

A grayscale-alpha color target.

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.

Color target customization

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, 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, 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, T, T)) -> C) -> [C]

Converts an image data buffer to a pixel array, 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 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], 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, 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, T)) -> [UInt8]

Converts a pixel array to an image data buffer, using the given pixel kernel.

Data IO and file structure

enum PNG.Bytestream

A namespace for bytestream utilities.

protocol PNG.Bytestream.Source

A source bytestream.

protocol PNG.Bytestream.Destination

A destination bytestream.

struct PNG.Chunk

A chunk type identifier.

Parsed chunks

struct PNG.Header

An image header.

struct PNG.Palette

An image palette.

struct PNG.Transparency

A transparency descriptor.

struct PNG.Background

A background descriptor.

struct PNG.Histogram

A palette frequency histogram.

struct PNG.Gamma

A gamma descriptor.

struct PNG.Chromaticity

A chromaticity descriptor.

enum PNG.ColorRendering

A color rendering mode.

struct PNG.SignificantBits

A color precision descriptor.

struct PNG.ColorProfile

An embedded color profile.

struct PNG.PhysicalDimensions

A physical dimensions descriptor.

struct PNG.SuggestedPalette

A suggested image palette.

struct PNG.TimeModified

An image modification time.

struct PNG.Text

A text comment.

Contextual decoding

enum PNG.Standard

A PNG standard.

struct PNG.Context

A decoding context.

Currency types

struct PNG.Percentmille

A rational percentmille value.

Error handling

protocol PNG.Error

Functionality common to all library error types.

enum PNG.LexingError

A lexing error.

enum PNG.FormattingError

A formatting error.

enum PNG.ParsingError

A parsing error.

enum PNG.DecodingError

A decoding error.

enum LZ77.DecompressionError

A decompression error.

See also

enum System

A namespace for platform-dependent functionality.

enum LZ77

A namespace for LZ77-related functionality.