Simple local guide on how to install a program to convert images to ASCII art.
You can find all instructions here.
Github Repository: 🔗 https://github.com/Hugana/p2ascii
Installation
On my machine, Python did not allow installing packages normally, so I had to create a virtual environment:
Do not forget to change your username (YourUsername) in these commands
|
|
Then I activated it:
|
|
And installed dependencies via pip:
|
|
Now, just navigate to the folder where your image is and run these two commands:
|
|
Examples
Usage taken from Github
I know it’s a bit lazy, but I want to save this here for myself.
Simple Conversion (No Edge Detection)
sc2image <img> [--transparent] Convert image to ASCII image
sc2text <img> Convert image to ASCII text (stdout)
sc2cimage <img> [--transparent] Colored ASCII image
sc2ctext <img> Colored ASCII text (stdout)
Complex Conversion (With Edge Detection)
cc2image <img> <thresh> [--transparent] ASCII image using edge orientation
cc2text <img> <thresh> ASCII text with edge symbols (stdout)
cc2cimage <img> <thresh> [--transparent] Colored ASCII image with edge awareness
cc2ctext <img> <thresh> Colored ASCII text with edge symbols
Threshold Parameter ()
Used in complex conversion to control edge sensitivity based on gradient magnitude.
auto: Automatically computes threshold as the 90th percentile of non-zero magnitudes:
0–255: Manual threshold.
Higher = fewer edges (only strong ones)
Lower = more edges (fine details)
Transparency Mode (–transparent)
When included, the output ASCII image will have a transparent background, displaying only the characters. This option is applicable to image output commands: sc2image, sc2cimage, cc2image, and cc2cimage.