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
- path string Path to the file, supported types are ".skimg", ".skgrp", ".blit", ".nfp", and ".nft".
- override string Type to load file as, overriding the file type.
Returns
- table The image file, to be fed into a drawing routine.
- draw(image, opts [, tOutput])Source
Draw an image produced by load.
Parameters
- image Image to draw.
- 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.
- tOutput? table Terminal to draw to. Has different requirements based on image type. Defaults to
term.current()