Image to Text Art Converter
Igniting Inspiration,
Designing Tomorrow
Discover a web-based image to text tool designed to allow users to convert their images to text real time on canvas.
Key Features and Functionalities
Image Upload Handling
Supports uploading images in jpg
, jpeg
, gif
, and png
formats.
Validates file type and size (maximum 5MB).
Moves the uploaded file to a specified directory (../upload/
).
Image to Text Art Conversion
Converts the uploaded image into ASCII text art.
Resizes the image to a specified target dimension (200x300
pixels).
Uses a predefined set of ASCII characters (@%#*+=-:.
) to represent different levels of brightness.
Text Art Display
Displays the generated text art in a <pre>
element with monospace font and reduced line height for better readability.
Provides a button to copy the text art to the clipboard.
File Management
Deletes the uploaded image file after generating the text art to avoid accumulation of files.
Error Handling
Provides error messages for invalid file formats, file size limits, and other potential issues during file upload and processing.
How to Use This Program
Upload an Image
Open the web page containing the form.
Click on the “Select Image” button to choose an image file from your local machine.
Ensure the image is in one of the supported formats (jpg
, jpeg
, gif
, png
).
The image should not exceed 5MB in size.
Submit the Form
After selecting the image, click the “Upload Image” button to submit the form.
The server will process the image and convert it into text art.
View the Text Art
Once the image is processed, the text art will be displayed in a <pre>
element below the form.
The text art is rendered in a monospace font with reduced line height to maintain the aspect ratio of the original image.
Copy the Text Art
A “Copy Text Art” button will appear below the text art.
Click this button to copy the text art to your clipboard.
A confirmation alert will notify you when the text art has been successfully copied.
Clean Up
After the text art is generated and displayed, the uploaded image file is automatically deleted from the server to save space.
Example Workflow
User Action
User selects a jpg
image file from their computer.
User clicks “Upload Image” to submit the form.
Server Processing
The server validates the file type and size.
The image is uploaded to the ../upload/
directory.
The server converts the image to text art.
Display and Interaction
This program provides a simple and efficient way to convert images into ASCII text art, making it a fun tool for creative projects or text-based representations of images.
Image to text
Compbat ERP Consulting AB
Empowering Businesses with Intelligent ERP Solutions