0

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?

limitfly
  • 11
  • 1
  • 5

2 Answers2

6

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

Werner Kvalem Vesterås
  • 10,226
  • 5
  • 43
  • 50
  • Could you please explain how to do this? I get the above error although my system variable 'Path' already includes: c:\program files\graphicsmagick-1.3.18-q8; – adamK Jun 13 '13 at 01:19
  • Nevermind, seems I'm an idiot. Just needed to restart for the path variable to take effect. – adamK Jun 13 '13 at 01:26
0

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

npm install gm
anh_ng8
  • 1,100
  • 10
  • 16