Skip to content

Ju-lion28/img_to_ansi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Image to ANSI

This is a CLI thing using Python.

Usage

python img_to_ascii.py path {str} [-w {int}] [-a {float}] [-s] [-c] [-b] [-o]

Positional Arguments

Argument Description

path {str}

path to image

Optional Arguments

Option Description

-h, --help

Show this help message and exit

-w, --width {int}

Set the character width for the ASCII converted image. [Default: 100]

-a, --aspect_ratio {float}

Adjust the aspect ratio to account for the height of your font, since characters are not square. [Default: 0.55]

-s, --clearScreen

Clear the terminal screen before printing the ASCII image

-c, --colour256

Use 256-colour ANSI mode (less vibrant). If not set, use 24-bit colour mode (more vibrant)

-b, --background

Add background colours to the pixels, which can sometimes produce unexpected results

-o, --output

Generate a .txt file with all the ANSI codes included. Note: The output file can be very large and unoptimized for filesize.

By Julian

About

converts images into ascii with colour; ansi

Topics

Resources

Stars

Watchers

Forks

Languages