Image to ASCII Art Converter
A tool that converts images into ASCII art representations.
View on GitHubOverview
As a semester project for my C++ programming course at the university, I developed a console application that converts images into ASCII art representations. The project aimed to enhance my understanding of C++ programming concepts, including file handling, image processing, class inheritance, polymorphism and creating console UI.
The application reads an input image file(s), processes it to map pixel brightness to corresponding ASCII characters, and outputs the resulting ASCII art to the console or saves it to a text file. The application has a whole console user interface that allows users to select images, use image filters and show slideshows.
Technical Details
The application is built using C++ and leverages the NCurses library for creating the console user interface, as well as the LibPNG and LibJpeg libraries for handling image files. The project is structured using object-oriented programming principles, with classes representing different components of the application, such as image loading, filters, UI components and more.
The image processing is done by hand, where I had to learn the common image file formats (BMP, PNG, JPEG) to detect the file type. Then the image data is read and converted to grayscale. Finally, each pixel's brightness is mapped to a specific ASCII character based on a predefined character set. The character set can be changed by the user in a config file.
Technologies Used
- C++
- NCurses (for console UI)
- LibPNG (for PNG image handling)
- LibJpeg (for JPEG image handling)
- Make (for build automation)