1.0.0 • Published 2 years ago

@mrijoo/text2image v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Text2image

Instalation :

npm i @mrijoo/text2image

Usage:

const text2image = require('@mrijoo/text2image')

Example

const fs = require("fs")
const text2image = require('@mrijoo/text2image');

text2image.convert('Hello, World!', "ObelixProBIt-cyr", { family: 'pg' }, { x: 70, y: 50, width: 400,  height: 400 }, {}).then(base64 => {
    fs.writeFile("out.png", base64.replace(/^data:image\/png;base64,/, ""), 'base64', function() {});
})