juji
01-03-2019, 09:03 PM
var Jimp = require("jimp");
var fileName = 'handshake.jpg';
var imageCaption = "Proud to be Cody's friend";
var loadedImage;
Jimp.read(fileName)
.then(function (image) {
loadedImage = image;
return Jimp.loadFont(Jimp.FONT_SANS_64_BLACK);
})
.then(function (font) {
loadedImage.print(font, 130, 72, imageCaption)
.write(fileName);
})
.catch(function (err) {
console.error(err);
});
http://bayimg.com/95eaa0d6e78f2346d3f7f708fbd71942540eda3d.jpg
var fileName = 'handshake.jpg';
var imageCaption = "Proud to be Cody's friend";
var loadedImage;
Jimp.read(fileName)
.then(function (image) {
loadedImage = image;
return Jimp.loadFont(Jimp.FONT_SANS_64_BLACK);
})
.then(function (font) {
loadedImage.print(font, 130, 72, imageCaption)
.write(fileName);
})
.catch(function (err) {
console.error(err);
});
http://bayimg.com/95eaa0d6e78f2346d3f7f708fbd71942540eda3d.jpg