Author: | victorqribeiro |
---|---|
Views Total: | 539 views |
Official Page: | Go to website |
Last Update: | November 15, 2022 |
License: | MIT |
Preview:

Description:
imgToAscii is a pure JavaScript implementation of image-to-ASCII conversion, which allows you to convert images into ASCII art.
See Also:
How to use it:
1. Download and insert the imgToAscii.js into the document.
<script src="src/imgToAscii.js"></script>
2. Create a new imgToAscii instance and define the path to the image.
let ele = new imgToAscii('example.jpg');
3. Set the width of the image (0 to 1).
// 50% let ele = new imgToAscii('example.jpg', 0.5);
4. Display the ASCII art on the page.
ele.display();
5. Set the background color of the ASCII art.
ele.display('#ff0000');