GithubHelp home page GithubHelp logo

ascii_art_rs's Introduction

ASCII-art-rs

A simple Rust commandline program to make ASCII art. It uses Nannou and so requires a desktop.

Usage

Usage is as follows: ascii_art_rs.exe -i img.jpg -o img_ascii.png -s 10000 --height 1000 --chars abcdefghijklmnopqrstuvwxyz.

-i <FILE>                 The path to the input image.
-o <FILE>                 The path where the ASCII art will be saved. [default: ascii_art.png]
-s <NUMBER>               How many letters to place. [default: 500]
    --width <NUMBER>      The width of the output image.
    --height <NUMBER>     The height of the output image. [default: 1000]
    --chars <CHARACTERS>  The characters you want to be used in output image. (Defaults to visible ASCII characters)
    --colour              Uses accurate colours when specified, instead of grayscale.
-h, --help                Print help
-V, --version             Print version

Usage Notes

The only required argument is -i.

--colour takes no values, it's a boolean flag.

The width/height arguments are mutually exclusive. This is because the aspect ratio of the image is preserved, so the height is dependent on the width and vice versa.

Example Output

Example Image

This was obtained with the following command, using this image (687x1024 version) as input: ascii_art_rs.exe -i mona_lisa.jpg -s 15000 --height 1024 -o example.png

TODO

  • If the output width/height is larger than the desktop width/height, scale the window size so it fits entirely on the desktop.
  • Add an argument for accurate colours, as opposed to grayscale.
  • Add a non-GUI argument for true commandline use.
  • Add arguments for minimum and maximum character sizes.
  • Add an argument to place characters in grids/cells, rather than random placement.
  • Add an argument to output a video by capturing all frames
  • Set a more reasonable default value for steps, so that it varies depending on the image size and stops output images from being too sparse/dense.

ascii_art_rs's People

Contributors

shroom00 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.