In the terminal I can use the following snippet to create an image with a "polaroid design" (see http://www.imagemagick.org/Usage/thumbnails/#polaroid).
convert -caption 'mycaption' myimage.jpeg -thumbnail 250x250 \
-bordercolor Lavender -background gray40 -gravity South \
-font "Helvetica.ttf" -pointsize 12 -density 144 +polaroid \
polaroid.jpeg
How would I accomplish this in the node version of imageMagick/gm (https://github.com/aheckmann/gm)?
var gm = require('gm');
var fs = require('fs');
var imageMagick = gm.subClass({ imageMagick: true });
imageMagick("myimage.jpeg")
.resize(250, 250)
//CREATE POLAROID HERE SOMEHOW???
.write("polaroid.jpeg", function (err) {});
Thanks for any hints!
Use gm().command(), gm().in(), and gm().out (see https://github.com/aheckmann/gm#custom-arguments)