node-text2img

0.0.3 • Public • Published

node-text2img

npm

npm install node-text2img
const t2i = require("./index");
const text = "Your Text\nHere!";
// configs can be omitted
const configs = {
    font: {
        font: "24px 宋体",
        fontHeight: 24,
        fontMaxWidth: 24,
        fillStyle: "black",
    },
    size: {
        maxCharsPerLine: 50,
        paddingX: 24,
        paddingY: 24,
    }
};
const base64Url = new t2i(text, configs).text2img(); // base64 url like "data:image/png;base64,#picdata#"
console.log(base64Url);

Readme

Keywords

Package Sidebar

Install

npm i node-text2img

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

4.8 kB

Total Files

4

Last publish

Collaborators

  • exsper