fabricjs-node-img

1.0.7 • Public • Published

fabricjs-node-img

genera imagenes png y svg

format image png or jpg

const fs = require('fs');
const { JSDOM } = require("jsdom");
const { document } = new JSDOM("").window;
const {Canvasnode} = require('fabricjs-node-img');
global.document = document;
 
(async function() {    
    let jsonFile = await JSON.parse(fs.readFileSync('./json/1.json'));
    let conf =  { 
        "IMAGE" : {"size" : [400, 600, 800, 1000, 2000], 'format' : 'jpg', 'name': "IMAGE_ARTIFY_"}, 
        "SVG" : true,
        'JSON': true,
        'DEST_FOLDER': './file/',
        'JSON_STRING' : jsonFile
    }    
    let generatePng = new Canvasnode(conf);    
    let loadjson = await generatePng.loadCanvas();    
})();

Readme

Keywords

none

Package Sidebar

Install

npm i fabricjs-node-img

Weekly Downloads

1

Version

1.0.7

License

ISC

Unpacked Size

1.17 MB

Total Files

13

Last publish

Collaborators

  • evious