imageprinter
v1.1.1
Published
将图片转换成指定字符串(轮廓)输出
Downloads
34
Maintainers
Readme
imagePrinter
将图片转换成指定字符串(轮廓)输出
Usage
let logImg = new logImage({
imagePath: "./sources/test.png",
});
logImg
.print()
.then((res) => {
console.log("done: ", res);
document.querySelector(".res").innerHTML = res;
})
.catch((err) => {
console.log(err);
});
Additonal Options
let defaultOptions = {
debug: false,
imagePath: "",
quality: 6, //0~10,越小越清晰,输出内容越大
lightFill: " ", //明亮区域(yuv的y >= 190)填充内容
darkFill: "x", //幽暗区域填充内容
};