admin管理员组文章数量:1429763
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.
本文标签: javascriptnodejsError spawn ENOENT while adjusting image size using module gmStack Overflow
版权声明:本文标题:javascript - nodejs - Error: spawn ENOENT while adjusting image size using module gm - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745552539a2663009.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论