0
I am doing a test project to see the features of gm module, because I need to manipulate images on the server (resize, place Watermark, generate Thumb, among others).
Well, I installed Graphicsmagick via Homebrew using the command
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 mine 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 proper require on top using var gm = require('gm');
This code is returning to me an error that I could not identify
{message:{"code": null,signal": "SIGTRAP"}}
Someone who has had a similar problem knows what it can be, if it can be solved or if it has some other good module to use for the tasks I need?
What does this method
size
? I didn’t find in the gm documentation.– bfavaretto
http://aheckmann.github.io/gm/docs.html#getters
– Leandro Cissoto