Module savepng

Types

PngEncoderOpts = object
  colorType: ColorType

Procs

proc default_opts(): PngEncoderOpts {.raises: [], tags: [].}
proc new_opts(colorType: ColorType): PngEncoderOpts {.raises: [], tags: [].}
Create an encoder options struct for a given color type. Note that for grayscale color types, the value in the red channel is taken as the gray value; green and blue channels are ignored, and the alpha channel is ignored for gray (but not graya).
proc save_png(img: Image; buf: Stream; opts: PngEncoderOpts) {.
    raises: [Exception, ValueError], tags: [WriteIOEffect].}
proc save_png(img: Image; buf: Stream) {.raises: [Exception, ValueError],
                                    tags: [WriteIOEffect].}