About Graphics Magick for node Error

I run nodejs in windows and install gm with npm.

var readStream = fs.createReadStream(__dirname + '/../temp/a.jpg'); gm(readStream, 'a.jpg').write(__dirname + '/../temp/b.png', function (err) {if (err) console.log(err);});

Then I got the msg:

{ [Error: Command failed: CreateProcessW: ϵͳ�Ҳ���ָ�����ļ���] code: 127, signal: null }

Does gm support the windows or how could I deal with?

Putting the GraphicsMagick installation directory in the PATH environment variable solved the problem for me.

You need to first install GraphicsMagick (http://www.graphicsmagick.org/). Then:

npm install gm