A web-based ASCII Art Generator that transforms your images into ASCII art. This project uses Java servlets for backend processing and vanilla JavaScript for the frontend.
- Upload and convert images to ASCII art
- Responsive design for various screen sizes
- Light and dark mode toggle
- Copy generated ASCII art to clipboard
- Error handling and user notifications
Before you begin, ensure you have met the following requirements:
- Java Development Kit (JDK) 11 or later
- Apache Maven 3.6.0 or later
- Apache Tomcat 9.0 or later (or any other Java servlet container)
- Git (for cloning the repository)
Follow these steps to set up the ASCII Art Generator locally:
-
Open a terminal or command prompt.
-
Clone the repository:
git clone https://github.com/dxvzz/ASCII-Art-Generator.git
- Navigate to the project directory:
cd ASCII-Art-Generator
- Build the project using Maven:
mvn clean package
- The build process will create a WAR file in the
targetdirectory. Copy this WAR file to your Tomcat'swebappsdirectory:
cp target/ascii-art-generator.war /path/to/tomcat/webapps/
- Start your Tomcat server:
/path/to/tomcat/bin/startup.sh # On Unix-based systems
/path/to/tomcat/bin/startup.bat # On Windows
- Once Tomcat has started, the application should be accessible at:
http://localhost:8080/ascii-art-generator
If you encounter issues during installation or startup, try the following:
-
Ensure all prerequisites are correctly installed and configured.
-
Check Tomcat logs for any error messages:
tail -f /path/to/tomcat/logs/catalina.out
-
Verify that the WAR file was successfully deployed by checking the
webappsdirectory for anascii-art-generatorfolder. -
If the application doesn't start, try restarting Tomcat:
/path/to/tomcat/bin/shutdown.sh && /path/to/tomcat/bin/startup.sh # On Unix-based systems
/path/to/tomcat/bin/shutdown.bat && /path/to/tomcat/bin/startup.bat # On Windows
-
Ensure that port 8080 is not being used by another application.
-
If you're still experiencing issues, please open an issue on the GitHub repository with detailed information about the problem and your environment.
-
Open your web browser and navigate to
http://localhost:8080/ascii-art-generator. -
Click on the "Choose an image" button to select an image file.
-
Click "Generate ASCII Art" to convert your image.
-
Once generated, you can copy the ASCII art using the "Copy" button.
-
Toggle between light and dark modes using the switch in the top-right corner.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE.md file for details.
Note
This ASCII Art Generator works best with high-contrast images. For optimal results, try using images with clear outlines and distinct features.
Tip
Experiment with different image sizes to achieve varied ASCII art effects. Larger images may produce more detailed ASCII art, while smaller images can create interesting abstract patterns.
Important
Make sure you have Java 11 or later installed on your system before attempting to run this application. The project won't compile or run correctly without the proper Java version.
Warning
Uploading very large image files may result in longer processing times and could potentially crash the application. It's recommended to use images smaller than 5MB for the best experience.
Caution
This application processes images on the server. Be mindful of the images you upload, as they will be temporarily stored on the server during processing. Avoid uploading sensitive or personal images.
- Font Awesome for the icons
- Imgscalr for image processing
Made with ❤️ by Devdatta Mudliar

