我正在尝试使用 node.js、grunt 和 grunt 插件调整 4000 张图像的大小。目前我正在使用,grunt-imagemagick
但无论我使用什么,我都会遇到类似的错误。
任何人都可以对错误有所了解,或者推荐一个 grunt 插件,该插件可以在 OSX 上开箱即用,用于中等大小的图像目录?
- 操作系统:OSX 10.9
- 节点:v0.8.16
- 咕噜声:v0.4.1
- grunt-imagemagick:https ://npmjs.org/package/grunt-imagemagick
--stack
这是使用选项运行 grunt 任务时控制台的输出
$ grunt --stack imagemagick-resize
Running "imagemagick-resize:people" (imagemagick-resize) task
Beginning ImageMagick resizing process
resizing:../photos_src/organisms/Genus_Acanthostrongylophora^Species_ashmorica.jpg...
...
... (approx 170 files)
...
resizing:../photos_src/organisms/Genus_Chrysomelobia^species_lipsettae.jpg...
resizing:../photos_src/organisms/Genus_Chrysomelobia^species_vafer.jpg...
Warning: spawn EMFILE Use --force to continue.
Error: spawn EMFILE
at errnoException (child_process.js:847:11)
at ChildProcess.spawn (child_process.js:794:11)
at Object.exports.spawn (child_process.js:618:9)
at exec2 (/Users/user/Documents/projectName/node_modules/grunt-imagemagick/node_modules/node-imagemagick/lib/imagemagick.js:24:25)
at Object.exports.convert (/Users/user/Documents/projectName/node_modules/grunt-imagemagick/node_modules/node-imagemagick/lib/imagemagick.js:262:10)
at resizeCall (/Users/user/Documents/projectName/node_modules/grunt-imagemagick/node_modules/node-imagemagick/lib/imagemagick.js:267:22)
at Object.exports.resize (/Users/user/Documents/projectName/node_modules/grunt-imagemagick/node_modules/node-imagemagick/lib/imagemagick.js:282:10)
at Object.ResizeCommand.init (/Users/user/Documents/projectName/node_modules/grunt-imagemagick/tasks/imagemagick.js:112:13)
at Object.<anonymous> (/Users/user/Documents/projectName/node_modules/grunt-imagemagick/tasks/imagemagick.js:222:11)
at Object.task.registerMultiTask.thisTask (/Users/user/Documents/projectName/node_modules/grunt/lib/grunt/task.js:258:15)