Socket
Socket
Sign inDemoInstall

imageprinter

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    imageprinter

将图片转换成指定字符串(轮廓)输出


Version published
Maintainers
1
Created

Readme

Source

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", //幽暗区域填充内容
};

Keywords

FAQs

Last updated on 16 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc