chromatic image
usage: chromatic image [-h] {ansify,npy} ...
positional arguments:
{ansify,npy}
options:
-h, --help show this help message and exit
chromatic image ansify
usage: chromatic image ansify [-h] [--font-dir DIRECTORY] [--font FONT] [--size SIZE]
[--bg COLOR] [--fg COLOR] [--alpha] [--format {WEBP,GIF}]
[--duration N] [--loop N] [-a ANSITYPE]
[--equalize | --no-equalize | --white-point] [--input-bg COLOR]
[--factor N]
[-c CHARS | --ascii | --latin1 | --cp437 | --cp1252]
[--sort | --no-sort | -r] [-o FILE] [--dump-npy FILE]
[--dump-text FILE | --stdout] [--show | --no-show]
IMAGEFILE
positional arguments:
IMAGEFILE input image
options:
-h, --help show this help message and exit
--equalize, --no-equalize
whether to apply contrast stretch equalization before image-to-ansi
conversion
--white-point apply white-point equalization before image-to-ansi conversion
-c CHARS, --chars CHARS
charset where CHARS is a string containing chars to use for glyph
selection. a char can appear more than once, which affects frequency
distribution
--ascii use printable characters from ASCII character encoding as charset
--latin1 use printable characters from Latin-1 character encoding as charset
--cp437 use printable characters from code page 437 character encoding as
charset
--cp1252 use printable characters from Windows-1252 character encoding as
charset
--sort, --no-sort whether to sort glyphs based on their perceived 'luminance'. for
example, ('.' -> '#') is (dark -> light)
-r, --reverse sort glyphs in reverse order. flips the luminance mapping to (light ->
dark)
--dump-text FILE write the ansified image text to FILE
--stdout write the ansified image text to stdout
env options:
--font-dir DIRECTORY path to font directory (env: CHROMATIC_FONTS=)
font options:
--font FONT name of user font, or path to truetype font file
--size SIZE font size, in pixels
color defaults:
--bg COLOR default background color. can be hex rgb(a) value or color name
--fg COLOR default foreground color. can be hex rgb(a) value or color name
--alpha use alpha channel with defaults: bg=0, fg=0xFF
animation options:
--format {WEBP,GIF} animated image fallback format
--duration N animation per-frame duration, in milliseconds
--loop N number of times to loop the animation. a value of 0 means loop
indefinitely
colorization options:
-a ANSITYPE, --ansi-type ANSITYPE
which ansi colorspace to use for color quantization. since truecolor
is rgb, '24b' effectively means 'original colors' (choices: 4b, 8b,
24b)
--input-bg COLOR initial background (canvas) color, injected as an attribute on the
intermediate text object itself. can be hex rgb value or color name
(default: None)
glyph options:
--factor N scaling factor for image width to N columns per output line. analogous
to level-of-detail
output options:
-o FILE, --outfile FILE
save the image to FILE
--dump-npy FILE save the ansi array to FILE as a NumPy file
--show, --no-show whether to show the image in the system's image viewer
chromatic image npy
usage: chromatic image npy [-h] [--font-dir DIRECTORY] [--font FONT] [--size SIZE]
[--bg COLOR] [--fg COLOR] [--alpha] [--format {WEBP,GIF}]
[--duration N] [--loop N] [-o FILE] [--dump-npy FILE]
[--dump-text FILE | --stdout] [--show | --no-show]
NPYFILE
positional arguments:
NPYFILE path to ansi array NumPy file
options:
-h, --help show this help message and exit
--dump-text FILE write the ansified image text to FILE
--stdout write the ansified image text to stdout
env options:
--font-dir DIRECTORY path to font directory (env: CHROMATIC_FONTS=)
font options:
--font FONT name of user font, or path to truetype font file
--size SIZE font size, in pixels
color defaults:
--bg COLOR default background color. can be hex rgb(a) value or color name
--fg COLOR default foreground color. can be hex rgb(a) value or color name
--alpha use alpha channel with defaults: bg=0, fg=0xFF
animation options:
--format {WEBP,GIF} animated image fallback format
--duration N animation per-frame duration, in milliseconds
--loop N number of times to loop the animation. a value of 0 means loop
indefinitely
output options:
-o FILE, --outfile FILE
save the image to FILE
--dump-npy FILE save the ansi array to FILE as a NumPy file
--show, --no-show whether to show the image in the system's image viewer