The imageToAscii(source, options, callback) function converts an image (from a local path, URL, or Buffer) into ASCII art.
Basic usage:
const imageToAscii = require("image-to-ascii");
imageToAscii("https://example.com/image.png", (err, converted) => {
console.log(err || converted);
});
Usage with options (e.g., disabling color):
imageToAscii("https://example.com/image.jpg", {
colored: false
}, (err, converted) => {
console.log(err || converted);
});
const imageToAscii = require("image-to-ascii");
imageToAscii("https://octodex.github.com/images/octofez.png", (err, converted) => {
console.log(err || converted);
});