node.js image codec and simple processing