Create image on nodes with graphics

I need a way to create an image on a magick chart via node.js

I can usually handle this:

gm convert -background transparent -pointsize 30 -gravity Center label:türkçee HEEEEEY.png 

I need the equivalent of this input in node.js like;

 var gm = require('gm'); gm.background('transparent') .gravity('Center') .fontSize(30) .drawText('Test') .write('HEEEY.png') 

PS: I do not want to specify the image size as a parameter. (sorry for my English)

+4
source share
1 answer

Take a look at node -grapicksmagick README under the “Image Creation” section.

 // creating an image gm(200, 400, "#ddff99f3") .drawText(10, 50, "from scratch") .write("/path/to/brandNewImg.jpg", function (err) { // ... }); 
+10
source

Source: https://habr.com/ru/post/1400642/


All Articles