Package Exports
- @mrijoo/text2image
- @mrijoo/text2image/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mrijoo/text2image) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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() {});
})