Skip to content

Latest commit

 

History

History
 
 

2.0.1

Module

MaxPNG

Efficiently decode, validate, and encode image data stored in the PNG format, and convert it to formats useful for common graphics libraries.


Symbols

Free functions

func png_decode(path:String, recognizing recognized:Set<PNGChunk>)

Decompress, decode, and validate the raw pixel contents of a PNG file, without performing deinterlacing or deindexing.

func png_encode(path:String, raw_data:[UInt8], properties:PNGProperties, chunk_size:Int) throws

Compress, encode, validate, and write the contents of a raw pixel buffer to a PNG file.

func png_encode(path:String, raw_data:UnsafeBufferPointer<UInt8>, properties:PNGProperties, chunk_size:Int) throws

[Since: 2.0.1] Compress, encode, validate, and write the contents of a raw pixel buffer to a PNG file.

Structures

struct RGBA

A normalized color unit consisting of four color samples.

The non-pixel image data associated with a PNG file, as specified in the PNG standard.

Classes

A progressive PNG reader object that provides pixel data lazily, scanline by scanline, and closes all file and decompression streams when it goes out of scope.

A progressive PNG writer object that encodes pixel data lazily, scanline by scanline, and closes all file and compression streams when it goes out of scope.

Enumerations

Public PNG chunks, as specified in the PNG standard.

The five PNG color formats, as defined in the PNG standard.

Errors that may occur when reading and decoding a PNG file from disk.

Errors that may occur when writing and encoding a PNG file from disk.

Errors that may occur when decompressing a PNG DEFLATE stream.

Errors that may occur when compressing a PNG DEFLATE stream.