A Java-based ASCII Art Generator that converts images to ASCII art using a customizable character set and resolution. This project includes a command-line interface for user interaction and supports multiple output formats, including console and HTML.
- Convert images to ASCII art.
- Customize the character set used for generating ASCII art.
- Adjust the resolution of the ASCII art.
- Choose between console and HTML output formats.
- Command-line interface for easy interaction.
- Java 8 or higher
- Clone the repository:
git clone https://github.com/NitBuk/asciiArt.git
- Navigate to the project directory:
cd asciiArt
- Compile the project:
javac -d bin src/**/*.java
- Run the application:
java -cp bin ascii_art.Shell
exit
- Exit the program.chars
- View the current character set.add <char>
- Add a character to the character set.add all
- Add all ASCII characters (32-126) to the character set.add space
- Add a space character to the character set.add <start>-<end>
- Add a range of characters to the character set.remove <char>
- Remove a character from the character set.remove all
- Remove all ASCII characters (32-126) from the character set.remove space
- Remove a space character from the character set.remove <start>-<end>
- Remove a range of characters from the character set.res [up|down]
- Change the resolution of the ASCII art.image <file_path>
- Change the input image.output [console|html]
- Set the output format.asciiArt
- Generate the ASCII art with the current settings.
ascii_art
- Contains the main application classes.ascii_art.exceptions
- Contains custom exception classes.ascii_output
- Contains classes for different output formats.image
- Contains classes for image manipulation.image_char_matching
- Contains classes for character brightness matching.
- SubImgCharMatcher: Manages the set of characters used to generate ASCII art and matches characters to image brightness.
- Image: Represents an image and provides methods to manipulate and retrieve image properties.
- AsciiArtAlgorithm: Contains the algorithm for converting images into ASCII art based on brightness values.
- ImagePadding: Provides utility methods for padding images to ensure they fit required dimensions.
- Shell: Provides a command-line interface for the ASCII art generator, allowing users to interact with the program and modify settings.
- ImageSplitter: Splits images into smaller segments and calculates brightness values.
- CharConverter: Converts characters to different formats for processing and matching.
- ConsoleAsciiOutput: Outputs the ASCII art to the console.
- HtmlAsciiOutput: Outputs the ASCII art to an HTML file.
The application uses custom exceptions to handle errors:
- InvalidCommandException: Thrown when an invalid command is entered.
- ResolutionChangeException: Thrown when there is an issue changing the resolution.
- ImageLoadException: Thrown when there is an issue loading the image.
- ShellRunException: Thrown when there is an issue running the shell.
NitBuk
None - do what ever you want with it. I'm not responsible for that :)