Skip to content

literally just an image -> ascii image generator

Notifications You must be signed in to change notification settings

schineaj23/asciigen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ascii from image

converts an image to ascii art

installation

pre-built binaries (SOMEONE PLEASE MAKE THIS WORK)

you can download the latest release from github: here

build from source

zig build -Drelease

the above command builds an executable found at ./zig-out/bin

if you want to just directly run the executable, run:

zig build run -Drelease -- [options]

see below for explanations for available options

usage

run the program with the following options (the default zig install directory is ./zig-out/bin):

/path/to/asciigen [options]
  1. options:

    • -h, --help: print the help message and exit
    • -i, --input <file>: specify the input image file (required)
    • -o, --output <file>: specify the output image file (optional, default: <input>_ascii.jpg)
    • -c, --color: use color ascii characters (optional)
    • -s, --scale <number>: set the downscale factor (optional, default: 1)
    • -e, --detect_edges: enable edge detection (optional)
    • --sigma1 <number>: set the sigma1 value for DoG filter (optional, default: 0.3)
    • --sigma2 <number>: set the sigma2 value for DoG filter (optional, default: 1.0)
  2. examples:

    basic usage:

    asciigen -i input.jpg -o output.png
    

    using color:

    asciigen -i input.png -o output.png -c
    

    with edge detection, color, and custom downscale:

    asciigen -i input.jpeg -o output.png -s 4 -e -c
    
  3. the program will generate an ascii art version of your input image and save it as a new image file.

output file needs to be a .png since i saw some weird issues with jpegs.

the zig version is the only one i'll be working on from here on. the c code was just to get me started until i figured out some issues with the build.zig

About

literally just an image -> ascii image generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Zig 67.7%
  • C 30.0%
  • Ruby 2.1%
  • Shell 0.2%