-
This project allows you to generate C code for ASCII art using 24-bit BMP format images. Transform your images into a fun ASCII representation effortlessly!
-
The BMP format is converted into equivalent functional block which can be copied and used in other C/C++ programs without using additional libraries .
- Convert 24-bit BMP images to ASCII art.
- Easily include generated code into your C programs.
- Precompiled executable for quick use.
Follow these steps to use the ASCII Art Generator:
-
Obtain Your BMP File
Find or create a BMP file, which can be downloaded from the internet or made using image generation software. -
Rename the File
Rename your BMP file to image.bmp. -
Run the Program:
- You can run the precompiled executable ASCII-Generator.exe.
- Alternatively, you can compile the source code yourself. Open a terminal in the same folder as the source code and run:
gcc ASCII-Generator.c -o ASCII-GENERATOR
-
Check the Output
After running the generator, check the Generated.c file. This file contains the C code for your ASCII art, which you can integrate into other functions or compile to test its output. -
Have Fun!
This repository includes:
- A sample BMP image for testing.
- The generated C code.
- A compiled version of the executable.
-
📐 Pixel Ratio: Each pixel is represented as
2 x 1.
For example, if you have a32 x 32image, the next image should be placed atrow = 0,column = 64. -
🎯 Coordinates Reference: The coordinates you provide to the function represent the upper-left corner of the image.
-
🖥️ Terminal Boundaries: Always provide coordinates that fit within the terminal view.
Placing images outside the visible area may cause issues.
You can resize the terminal using CTRL + Plus (+) and CTRL + Minus (-).
- This project uses stb_image.h by Sean Barrett.
- stb_image is a single-file public domain library for loading images in C/C++.
