pixie/fileformats/png

Consts

pngSignature = [137'u, 80'u, 78'u, 71'u, 13'u, 10'u, 26'u, 10'u]

Procs

proc decodePng(data: seq[uint8]): Image {...}{.raises: [PixieError], tags: [].}
Decodes the PNG data into an Image.
proc decodePng(data: string): Image {...}{.inline, raises: [PixieError], tags: [].}
Decodes the PNG data into an Image.
proc encodePng(width, height, channels: int; data: pointer; len: int): seq[uint8] {...}{.
    raises: [PixieError, PixieError], tags: [].}
Encodes the image data into the PNG file format. If data points to RGBA data, it is assumed to be straight alpha.
proc encodePng(image: Image): string {...}{.raises: [PixieError], tags: [].}
Encodes the image data into the PNG file format.
proc encodePng(mask: Mask): string {...}{.raises: [PixieError], tags: [].}
Encodes the mask data into the PNG file format.