This project converts images into ASCII art representations using C# and the .NET Framework. The program reads an image file, resizes it, converts it to grayscale, and then maps the pixel intensities to ASCII characters.
- Image Resizing: Automatically resizes images to fit within a specified maximum width.
- Grayscale Conversion: Converts images to grayscale for better ASCII representation.
- ASCII Mapping: Maps pixel intensities to a predefined set of ASCII characters.
- File Output: Saves the ASCII art to a text file.
- .NET Framework
- Windows OS (for
System.Windows.FormsandSystem.Drawingnamespaces)
- Open the Project: Load the solution in Visual Studio or any compatible C# IDE.
- Run the Program: Execute the program. It will prompt you to select an image file.
- Select an Image: Use the file dialog to choose an image file (supports BMP, PNG, JPG, JPEG formats).
- View ASCII Art: The ASCII art representation will be displayed in the console and saved to
image.txt.
- Program.cs: Contains the main entry point of the application. Handles file dialog, image processing, and output.
- Extensions.cs: Provides extension methods for converting a
Bitmapto grayscale. - BitmapToASCIIConverter.cs: Contains logic for converting a
Bitmapto an ASCII art representation.
Below is a screenshot of the program in action:
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.
