Problems with the gm (GraphicsMagick) module and node.js

0

I'm doing a test project to see the functionality of the gm module, since I need to manipulate images on the server (resize, put watermark , generate thumb , etc.) / p>

Well, I installed GraphicsMagick via Homebrew using the

brew install GraphicsMagick

And the installation rolled ok.

I installed the module in the project via npm using

npm install gm --save

I'm using express, and in my route I used the following code

exports.tamanho = function(req, res){

gm('./images/1.jpg').size(function(err, value){
  if(err) res.json(500, {message: err});
  res.json(200, {messagem: value});
});}

Doing the required require at the top using var gm = require('gm');

This code is returning an error for me that I could not identify

{message:{"code": null,signal": "SIGTRAP"}}

Someone who has ever had a similar problem knows what it can be, can it be solved, or does it have some other good module to use for the tasks I need?

    
asked by anonymous 20.05.2014 / 19:24

1 answer

1

I solved removing ImageMagick that was installed and GraphicsMagick. I just reinstalled GraphicsMagick and it worked.

    
06.06.2014 / 15:16