QImageMagick - Annotate

node v14.20.1
version: 4.0.0
endpointsharetweet
const { QIM, Annotate } = require("qimagemagick"); let source = 'https://placedog.net/854/480'; let buffer = await QIM.convert(source, { gravity: 'SouthWest', pointsize: 40, stroke: 'black', fill: 'pink', strokewidth: 1, font: 'DejaVu-Sans', annotate: new Annotate(new Date().toLocaleDateString('en-US'), '+20+0'), }).catch(reason => { console.log('error: ', reason); process.exit(1); }); buffer = await QIM.convert(buffer, { gravity: 'North', pointsize: 60, stroke: 'black', strokewidth: 1, fill: 'red', font: 'DejaVu-Sans', annotate: new Annotate('The Dog') }); buffer;
Loading…

no comments

    sign in to comment