Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

hwixley/ASCII-Art-Generator

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASCII Art Generator

A customisable script to transform images into ASCII art.


CODEQL Python Version


Input image Output ASCII
cage

Installation

  1. Clone the repository:
    git clone git@github.com:hwixley/ascii-art-generator.git
    
  2. Install the dependencies:
    pip3 install -r requirements.txt
    

Run the script

You can run the script using shell:

chmod +x ascii-art-generator.sh && ./ascii-art-generator.sh

Or using python:

python3 src/ascii_art.py

Arguments

All the following arguments are optional.

  • Image: the path of your input image, defaults to Nick Cage.
    -i <img_path>   or   --img <img_path>

  • Image Width: the "ASCII pixel" (two horizontally adjacent ASCII characters) width of your output ASCII image, defaults to 80.
    -w <img-width>   or   --img-width <img-width>

  • Charset: the size of charset for your ASCII image (options: tiny, small, medium, large), defaults to small.
    -c <charset>   or   --charset <charset>

  • Sampler: the pixel density sampler type (options: linear, log, exp), defaults to linear.
    -s <sampler>   or   --sampler <sampler>

  • Lower Bound: the lower bound of pixel density sampling, defaults to 0.2. Bounded in the range [0,1].
    -l <lower-ptg>   or   --lower-ptg <lower-ptg>

  • Upper Bound: the upper bound of pixel density sampling, defaults to 0.4. Bounded in the range [0,1].
    -u <upper-ptg>   or   --upper-ptg <upper-ptg>

  • Save/generate image: if specified will put the ASCII art into a PNG.
    -g   or   --gen-img

Utility Args

  • Help: lists available arguments.
    -h   or   --help

  • Version: lists current version.
    -v   or   --version

About

A python script to transform images into ASCII art in your terminal. Nick Cage DLC included.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.