1.0.7 • Published 3 years ago

fabricjs-node-img v1.0.7

Weekly downloads
12
License
ISC
Repository
github
Last release
3 years ago

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();    
})();
1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago