I'm stuck in the middle of the process of calculating the average color of an image via gm's subclass imagemagick. After resizing the image into a 1x1 image, I need to return the image information by "txt:-" so therefore im using the .out() command of gm. But now I don't know where and how to handle the callback ...
var gm = require('gm').subClass({
imageMagick: true
});
gm(IMAGEPATH).resize('1x1!').out('txt:-').... // how to get the string back ?