I am trying to create a thumbnail with an image that I have already saved. I am using the module gm
to adjust the size of the image.
var gm = require ('gm');
var fs = require('fs');
var savedphoto = "./testphoto.jpeg";
var testdir = "./testoutput.jpeg";
gm(savedphoto)
.resize(100, 100)
.noProfile()
.write(testdir, function (err) {
console.error (err);
});
When I run this I get the error spawn ENOENT
.
code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn.
How would I fix this problem?
I am trying to create a thumbnail with an image that I have already saved. I am using the module gm
to adjust the size of the image.
var gm = require ('gm');
var fs = require('fs');
var savedphoto = "./testphoto.jpeg";
var testdir = "./testoutput.jpeg";
gm(savedphoto)
.resize(100, 100)
.noProfile()
.write(testdir, function (err) {
console.error (err);
});
When I run this I get the error spawn ENOENT
.
code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn.
How would I fix this problem?
Share Improve this question edited Apr 8, 2014 at 8:00 user1180790 asked Apr 8, 2014 at 7:36 user3509834user3509834 312 bronze badges 2-
2
ENOENT means
Error NO ENTry
. The problem occurs when it tries to write, check your permissions – Lorenzo Marcon Commented Apr 8, 2014 at 7:39 - Or when a certain cache is full. – Robbie Bardijn Commented Apr 8, 2014 at 8:01
2 Answers
Reset to default 7Replace:
var gm = require('gm');
for
var gm = require('gm').subClass({ imageMagick: true });
Recipe for MacPorts users only (based on @RevNoah notice):
sudo port install GraphicsMagick
It will install GraphicsMagick library.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745552539a4632643.html
评论列表(0条)