const fs = require('fs'); const Jimp = require('jimp'); let str = 'Hello, world! ┌─-─┬ - │ 1 │ 2 │ ♖ │ ♘ │ \n HEllo' //let str ='┌─-─┬─-─┬─-─┬─-─┬─-─┬─-─┬─-─┬─-─┬─-─┐ \n' + // '│ - │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ \n' + // '├─-─╆━-━┿━-━┿━-━┿━-━┿━-━┿━-━┿━-━┿━-━┥ \n' + // '| A ┃ ♖ │ ♘ │ ♗ │ ♕ │ ♔ │ ♗ │ ♘ │ ♖ | \n' + // '├─-─╂─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┤ \n' + // '| B ┃ ♙ │ ♙ │ ♙ │ ♙ │ ♙ │ ♙ │ ♙ │ ♙ | \n' + // '├─-─╂─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┤ \n' + // '| C ┃ - │ - │ - │ - │ - │ - │ - │ - | \n' + // '├─-─╂─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┤ \n' + // '| D ┃ - │ - │ - │ - │ - │ - │ - │ - | \n' + // '├─-─╂─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┤ \n' + // '| E ┃ - │ - │ - │ - │ - │ - │ - │ - | \n' + // '├─-─╂─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┤ \n' + // '| F ┃ - │ - │ - │ - │ - │ - │ - │ - | \n' + // '├─-─╂─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┤ \n' + // '| G ┃ ♟ │ ♟ │ ♟ │ ♟ │ ♟ │ ♟ │ ♟ │ ♟ | \n' + // '├─-─╂─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┼─-─┤ \n' + // '| H ┃ ♜ │ ♞ │ ♝ │ ♚ │ ♛ │ ♝ │ ♞ │ ♜ | \n' + // '└─-─┸─-─┴─-─┴─-─┴─-─┴─-─┴─-─┴─-─┴─-─┘ \n'; Jimp.read("resources/start.png").then(function (image) { image.resize(1200, 1200); Jimp.loadFont(Jimp.FONT_SANS_32_BLACK).then(function (font) { image.print(font, 10, 10, str); image.write('resources/chess/img.png'); }); }).catch(function (err) { console.error(err); }); //var flag = new Jimp(200, 200, (err2, base) => { // image.contain(604, 303, Jimp.RESIZE_BICUBIC, (err3, src) => { // base.composite(src, 0, 88) // .composite(background, 0, 0) // .getBuffer(Jimp.MIME_PNG, (err4, buffer) => { // //message.channel.send(new Discord.Attachment(buffer)); // }); // }); //});