image

Provides image support for the library.

load(path, override)Load an image file.
draw(image, opts [, tOutput])Draw an image produced by load.
load(path, override)Source

Load an image file.

Parameters

  1. path string Path to the file, supported types are ".skimg", ".skgrp", ".blit", ".nfp", and ".nft".
  2. override string Type to load file as, overriding the file type.

Returns

  1. table The image file, to be fed into a drawing routine.
draw(image, opts [, tOutput])Source

Draw an image produced by load.

Parameters

  1. image Image to draw.
  2. opts { format? = string, x? = number, y? = number }

    Options for picture drawing.

    • format: Format to draw image as, if unpassed will try to figure out the image type.
    • x: X position to draw image at. Defaults to 1.
    • y: Y position to draw image at. Defaults to 1.
  3. tOutput? table Terminal to draw to. Has different requirements based on image type. Defaults to term.current()