Skip to content

zmn17/ascii-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–ΌοΈ ASCII Generator

ASCII Generator is a C++ tool that converts images into expressive ASCII art using only stb_image.h. It reads images (like JPEG or PNG), calculates pixel brightness, and maps them to ASCII characters β€” creating stunning terminal-style visuals.


✨ Features

  • πŸ–ΌοΈ Load .jpg, .png, and other formats via stb_image.h
  • 🎨 Outputs ASCII representation directly in terminal or to a file
  • πŸ“ Adjustable resolution and scaling
  • πŸ’‘ Customizable character sets
  • πŸ”§ Lightweight and dependency-free (besides stb_image.h)

πŸ“ Project Structure

ascii-generator/
β”œβ”€β”€ include/              # Header files (AsciiEngine.h, stb_image.h)
β”œβ”€β”€ src/                  # Source files (AsciiEngine.cpp, main.cpp)
β”œβ”€β”€ bin/                  # Compiled binary output
└── Makefile              # Easy build configuration

πŸ› οΈ Building the Project

Make sure you have a C++ compiler (e.g., g++ or clang++) installed.

git clone https://github.com/zmn17/ascii-generator.git
cd ascii-generator
make

Alternatively:

g++ -std=c++17 -Iinclude -o bin/ascii-art src/*.cpp

πŸš€ Usage

./bin/ascii-art path/to/image.jpg

Optionally, customize brightness mapping and resolution via the code or command-line (if implemented).


πŸ§ͺ Sample Output

@##%%==--...
++==--::..
  ...    

✨ Want colorized ASCII in terminal? Check out \033[1;Xm escape codes in C++.


πŸ“¦ Dependencies


🧩 Todo / Roadmap

  • Add grayscale image saving
  • Add CLI support for resolution and output path
  • Add more character set presets
  • Export colored ASCII to HTML or SVG

πŸ“„ License

Licensed under the MIT License.
Credit to nothings/stb for image loading.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published