pixie/fileformats/png

Types

Png = ref object
  width*, height*, channels*: int
  data*: seq[ColorRGBA]
  Source Edit

Consts

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

Procs

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